Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Powerbi dax running total calculation not doing what it's supposed to

Hey Guys,

 

Been looking for this problem for a while and i'm not finding the source of the problem. 

Just trying to do a simple running total calculation (see image).

I used this formula before with no problem however this time there seems to be something wrong. 

 

As you see in the table and  graph the formula is not performing as expected (should be a straight line). 

 

Vincentvbc_1-1597907972637.png

 

Any ideas? 

 

Thanks... 

 

Vincent

 

 

11 REPLIES 11
amitchandak
Super User
Super User

@Anonymous , What is the formula you are using. It should be something like this example

 

Cumm Sales = CALCULATE(Count(Table[Column]),filter(allselected(Table),Table[timestamp] <=max(Table[timestamp])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Oops, thought it was in the screenshot. 

Thats the exact calculation indeed:

 

Vincentvbc_0-1597908792909.png

 

Anonymous
Not applicable

Changed all() to allselected(), not getting output either; some records seem to be ignored? 

Final screenshot

Vincentvbc_0-1597909066898.png

 

Hi @Anonymous ,

 

Try 

 

Running Total = CALCULATE (SUM (RAP_MIX_MATCH[cumcount]), FILTER (ALL(RAP_MIX_MATCH) , RAP_MIX_MATCH [ AantalBundelVandag] <= MAX(RAP_MIX_MATCH [ AantalBundelVandag] ))

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

 

 

Anonymous
Not applicable

Still having issues with this one also (see table)

Vincentvbc_0-1597910161481.png

 

Anonymous
Not applicable

Well it seems to be correct in the end but where is powerbi finding those double records (with empty columns)? 

Hi @Anonymous ,

 

The timestamp column is from the Date Table and I assume your Date Table and the RAP_MIX_MATCH table have a 1 to many relationship.

 

Also, check if there are duplicate dates in your RAP_MIx_MATCH table.

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Hmm, I don't know..

No double data and the relationship is actually in both directions (see screenshots) (i'm using a push dataset)

 

Vincentvbc_0-1597910893851.png

Vincentvbc_1-1597910906927.png

Do you have any other idea as to why this is happening? 

 

Anonymous
Not applicable

Hi @Anonymous ,

Whether the field AantalBundelVandag and AantalStrokenVandag are from the same table RAP_MIXMATCH_PLC_EVENTS? Both of them are fact field in table? The field CUMCOUNT is fact field or calculated column? If it is calculated column, could you please provide the its formula? Besides that, what's the date type of the table TimeTable? Date/Time? Could you please provide some sample data in TimeTable table? It is better if you can provide your sample pbix file in order to make good troubleshooting... Thank you.

Best Regards

Rena

Hi @Anonymous ,

 

See if these help

 

https://www.sqlbi.com/articles/computing-running-totals-in-dax/

https://www.youtube.com/watch?v=RYU1O-incoI

 

Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

I doubt it's the formula as it's all over the internet + i'm using it on other data and its working fine.. 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors