Forum Discussion
Running/Cumulative total is wrong, showing the base values
Hello! I'm a bit new to PowerBI and I know this gets asked a lot but I have a problem with my running/cumulative total. I've been trying to solve this for more than a week now but I still can't solve it.
I have a report with different measures in a hierarchy with date value and I'm computing my running total. But my running total is returning the base value which is not the right value.
Below is my running total measure:
SUMX(FILTER(ALLSELECTED('Cashflow A'[Date].[Month]),'Cashflow A'[Date].[Month] <= MAX('Cashflow A'[Date].[Month])),[Total Category AB])
My base value is [Total Category AB].
Below is the my visual:
I prepared a pbix file and replicated my calculations in order to share with you the issue.
Github link (if the link above doesn't work)
Thank you very much in advance!
4 Replies
- amitchandak
Super User
crln-blue , Try like
SUMX(FILTER(ALLSELECTED('Cashflow A'[Date]),'Cashflow A'[Date] <= MAX('Cashflow A'[Date])),[Total Category AB])
or
SUMX(FILTER(ALLSELECTED('Cashflow A'),'Cashflow A'[Date] <= MAX('Cashflow A'[Date])),[Total Category AB])
- crln-blue
Post Patron
amitchandak wrote:crln-blue, Try like
SUMX(FILTER(ALLSELECTED('Cashflow A'[Date]),'Cashflow A'[Date] <= MAX('Cashflow A'[Date])),[Total Category AB])
or
SUMX(FILTER(ALLSELECTED('Cashflow A'),'Cashflow A'[Date] <= MAX('Cashflow A'[Date])),[Total Category AB])
I already tried this but it's still not working. The first formula you suggested gives off a large result and on the second formula, it's still the base value.
- amitchandak
Super User
crln-blue , I have done few changes. Added date table, modified formula for Total Category A , Total Category B, Create a measure(Cumulative) etc.
Please check the file attached after signature.