Forum Discussion
AmandaSoborg
8 years agoAdvocate II
Problems with accumulating in stacked column chart
Hi everyone I have a problem with my Power BI report I want to calculate a running total of my sales, but i am not sure i am doing it right. This is how my raw Data looks; I have a DimDa...
v-sihou-msft
8 years agoMicrosoft Employee
In this scenario, your "running" measure is based on current date to specify the "up to date" range. So when going to 2018, there's no fact data, then your running total supposes to keep same value all the way to the end.
If you want to keep it in one year, you need to apply filter on month number like:
=
CALCULATE (
[measure],
FILTER ( ALLSELECTED ( Table ), DimDate[MonthNum] <= MAX ( DimDate[MonthNum] ) )
)
If you want to calculate the running total within each year, you should use TOTALYTD() function.
Regards,