Forum Discussion
Cumulative Sum considering start and end dates
- Anonymous2 years ago
Hi GunnerJ ,
Check if this is your expected output:
Cumulative Accts = VAR max_date = MAX('Date Table'[Date]) RETURN CALCULATE( COUNT('Elec Service All Time'[BI_ACCT]), 'Elec Service All Time'[BI_CON_DT] <= max_date && 'Elec Service All Time'[BI_DISC_DT] > max_date )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi GunnerJ ,
Check if this is your expected output:
Cumulative Accts =
VAR max_date = MAX('Date Table'[Date])
RETURN
CALCULATE(
COUNT('Elec Service All Time'[BI_ACCT]),
'Elec Service All Time'[BI_CON_DT] <= max_date
&& 'Elec Service All Time'[BI_DISC_DT] > max_date
)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi,
thanks for the explanation, but I am also trying the same, using the max and min output of this slide in order to filter a table with cumulative counting.
The problem is, that it only works with the max_date as higher limit but not with the min_date as lower limit from the referenced Datetable
Here when I try with
as you can see it does not sum accumulative, just counts.
But if I change for example the min_value for an specific date (first january for example isntead of an output from the date visual), it works the cumulative sum:
here with specific date as minimum: