Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table with a set of values and dates that span two years. I have a filter to select year, and I created a measure to show the values for the last year as well. For both current and last year I have created measures for the running total. I also created a measure showing the difference between the running totals. Here are the graphs for these measures:
What I am having a problem with is creating a running total of the last one, meaning a running total of the changes between current and last years running totals. I can't use the SUM function on the last measure, and everything I've tried so far just gives me the same measure. Is this something that is possible to do?
The real data I am working on is pretty complicated, so I created this simple report for testing, where the screenshot from above is from: https://www.dropbox.com/s/efyf7feokqsgzes/pbi-running-total-test.pbix?dl=0
Solved! Go to Solution.
@MAG_PRG Try this:
@MAG_PRG Try this:
It worked, thanks! Creating a temp table was a neat trick, gonna have to remember that one.
@MAG_PRG , Please try either YTD with a date table
example
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected(date),date[date] <=max(date[Date])))
It's not exactly what I am after. On the middle graph I posted above I have the running total for current and last year. On the bottom graph I take the difference between current and last year from the graph above. What I need is a running total of the bottom graph, but since that is a measure I can't use the SUM function.
I have these measures:
Running total current year:
Running total last year:
Running total change(Total running current year - total running last year)
What I need is a running total of the last measure(bottom graph).