Forum Discussion
Cumulative total with legend
Hi,
I am new to power bi, i am trying to find out the cumulative total for counts.
I have versions for legend: e.g. osd 3, osd 4, osd 5
The following measure i used for finding cumulative total.
Typically this is how we get a cumulative date with a date table
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH)) Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-12,MONTH))Legend should create different cumulative lines
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
2 Replies
- amitchandak
Super User
Typically this is how we get a cumulative date with a date table
Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date],ENDOFMONTH(Sales[Sales Date]),-12,MONTH)) Rolling 12 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date Filer],MAX(Sales[Sales Date]),-12,MONTH))Legend should create different cumulative lines
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/ - v-yuta-msft
Community Support
Anonymous ,
Please modify the measure using dax like pattern below and check if this issue persists:
Cumulative total of different version = CALCULATE ( DISTINCTCOUNT ( dummy_data[version] ), FILTER ( ALLSELECTED ( dummy_data ), dummy_data[date_installed] <= MAX ( dummy_data[date_installed] ) ) )Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.