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

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

Reply
Anonymous
Not applicable

Cumulative dax doesnt return correct values.

Hi Guys,

 

I really need your help. Below you see mine DAX code which will give me Anti cumulative data. Unfortunatelly when I use this DAX then as you can see I dont get the correct result. I tried this DAX code in another file with simple test data and this worked perfectly.

This means that mine code works. But the question is why does this not work in mij data model?

Below you see a couple of information about mine data model en DAX code.

CR72021_0-1648477657563.png

 

This is the 2 tables which I am talking about. There is not a date table. the date columns are in dim trade table. dim_trade_surrkey is the PK and FK.

CR72021_1-1648477742961.png

 

Thanks in advance!

 



 

3 REPLIES 3
Anonymous
Not applicable

Hi guys,

 

I think I am almost there. Obviously I need to use Allselected instead of ALL then I am getting the right result. There is only one thing that I really dont understand.

Below you see 2 tables in both tables I have Year and trade_number as hierarchy. In table 1 I have a filter which is saying face value must be greater then 0. As you can see then I dont get the running total/cumulative. And in table 2 there is not a filter for face value. and the running total works correctly. 
CR72021_0-1648543719090.png

But when I remove trade_number and the filter of face value is greater then 0 is active then the running total works too. So why is that I really dont understand?!
CR72021_1-1648544128957.png

Thanks in advance!



 

 



Ashish_Mathur
Super User
Super User

Hi,

There should be a Date column in the Fact Table as well.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Anonymous , Try like example

 

calculate(Sum(Table[Value]), filter(all(Table), Table[Year] <= Max(Table[Year]) ) )

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.