where sample_date is a running date repleated daily even if there is no change in the data.
The visual is constructed as sample_date aggregated by Week distinct_countIf({customer_name}, {is_feature_enabled}=1) distinct_count({customer_name})
My question is: how do I compute a weekly YTD?
It should be the same as the second column, i.e. the distinct count of customers but for the time range of year start - row's week
Note that this is not a running total, as the same customer using the feature during several weeks is counted as one. E.g. theoretically all columns can have same value throughout the year, if all customers use the feature all the time.
Thanks @ErikG
While not exactly a solution but your first link led me to check the periodToDate*OverTime which helped me achieve what I need. I’ll post the solution below.
Here’s the solution I found - perhaps it would be helpful to somebody.
I defined a calculated field feature user as ifelse({is_feature_enabled}=1, {customer_name}, NULL),
and then the ytd field as periodToDateMaxOverTime(distinct_count({feature user}), {sample_day}, YEAR)