cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper V
Helper V

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:

crln-blue_0-1610939467645.png

 

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 4
Super User IV
Super User IV

@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])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!


@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.

@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.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Hello @amitchandak! Thanks for checking my powerbi file. I also checked the adjustments you did and I'm a bit confused why there is a separate table of dates. I think because of this, my other categories are not computed properly even though I already changed its logic. Also, I think the running total is not working because there is no value when used in the hierarchy. 

I checked the value (in a different way) of the running total and found out that it's still not working. Running total kept on getting the base value.

crln-blue_0-1610995546471.png

 

Helpful resources

Announcements
secondImage

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

secondImage

Power BI Women

Join our monthly meetings and learning sessions.

secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors