Forum Discussion
Anonymous
4 years agoNot applicable
Need help with running total
I am atemting to get a running total from the start of wnd of 2019 to the current date. Included is a picture of my dax code that is not currently working. Thanks!
- Anonymous4 years ago
I was able to fix it by making a my own date table and using this code:
Total Revenue running total in Quarter =CALCULATE(SUM('Matt-DataForBI'[Total Revenue]),FILTER(ALLSELECTED('Date'[Quarter]),ISONORAFTER('Date'[Quarter], MAX('Date'[Quarter]), DESC)))
AlexisOlson
Super User
4 years agoHmm. What if you replace ALLSELECTED ( 'Matt-DataForBI'[Date Closed] ) with ALLSELECTED ( 'Matt-DataForBI' )?
Anonymous
4 years agoNot applicable
I was able to fix it by making a my own date table and using this code:
Total Revenue running total in Quarter =
CALCULATE(
SUM('Matt-DataForBI'[Total Revenue]),
FILTER(
ALLSELECTED('Date'[Quarter]),
ISONORAFTER('Date'[Quarter], MAX('Date'[Quarter]), DESC)
)
)
- AlexisOlson4 years ago
Super User
Great! Having a date dimension table is almost always a good idea.