Tracker - having streak that only counts weekdays

Showing Streak using tracker, but don’t want to include weekends.

I am using Tracker to track various daily habits. I use the following code to show a summary of streak information…

searchType: Frontmatter
searchTarget: Sales
folder: Journal/1 Daily Journal
datasetName: Daily Sales Activity
startDate: 23-10-01
template: “Longest Streak: {{maxStreak()}} day(s)\nLongest Breaks: {{maxBreaks()}} day(s)\nLast streak: {{currentStreak()}} day(s)”

However, for this one habit, I only want to be doing it on weekdays. So I want the streak to only count weekedays. Is there any way to do this?

Things I have tried

I have only looked around on this forum, but haven’t found anything to do with streaks.

No replies. Is this perhaps in the wrong part of the forum?

Nope, this is the right place.

When I have a question, issue, or feature request for a specific plugin, I usually check their GitHub issues page as well. Maybe something there.

This does sound like something very specific for the Tracker plugin, so there might be less responses related to it unless someone else has done something similar. Therefore using the plugin’s github issue forum is really sound advice from @ariehen .

I’ve got one idea though, and that is to prepopulate the weekend with positive values for the habit in question. This depends on you using templates to create the field/thingy to track, and to adjust this to set a positive value on Saturday and Sunday. (Or alternatively just duplicate the Friday’s value, positive or negative)

This strategy will keep the streak going through the weekend, and pick up its “correct” value the next week. It’s a little hacky, but I’ve used it in other contexts with great success, and it might work in your case as well.

Thanks both. I’ll have a look at that forum to see what I can see,

I can easily just mark Saturday and Sunday’s as ‘done’ on the days, but it would mean my ‘streak’ days is actually wrong, by 2 days every week. It is what I’m going now, but it just seemed like something the tracker would be able to handle. Thanks for pointing me in the right direction.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.