Forum Discussion
Running total
- 8 years ago
Hi Anonymous,
Based on my test, you could refer to below formula:
running total measure = CALCULATE(SUM(Table1[Sales]), FILTER(ALL(Table1), 'Table1'[Date] <= MAX('Table1'[Date]) && YEAR('Table1'[Date]) = YEAR(MAX('Table1'[Date]))))Result:
You could download the pbix file to have a view, if the problem still occurs, could you please offer me some sample data to test?
https://www.dropbox.com/s/yitavv5yxuxt418/Running%20total.pbix?dl=0
Regards,
Daniel He
Anonymous Thank you for your response.
Here is my graph. What I am trying to get it to do is calculate the sales in June, then in July has the sales from June be added to the sales in July. Then in Aug have the sales from Jun & Jul added to Aug.
Maybe I didn't explain the issue in my first post clearly and I apologize. But that is what I am trying to do. I may have the correct formula but I am not sure how to format my graph to show the way I am looking for it to show. I am also new to power bi and still learning as I go. Thanks for all the help
Anonymous I understood what you are trying to do, could you share your power bi file so I can see what you are doing of it?
- Anonymous8 years agoNot applicable
try something like this
CurrentSales running total in FormatMM =
CALCULATE(
SUM('P3: Previous Month Sales'[CurrentSales]),
FILTER(
ALLSELECTED('P3: DimDate'[FormatMM]),
ISONORAFTER('P3: DimDate'[FormatMM], MAX('P3: DimDate'[FormatMM]), DESC)
)
)