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
Juarenga
New Member

DAX code - Disaggregates cummulative values

Hello all,


I'm having trouble figuring out the right DAX coding here. I want to calculate a column that disaggregates the cummulative values which are the known values. For instance, my table has the following fields: Product_ID, Orders_to_date, and Date. Orders_to_date has the cummulative total of orders the product has acummulated until that date. Now I need a DAX code that substracts Orders_to_date(t-1) from Orders_to_date(t) for each product and date in the source table. Hope the pic bellow helps to explains it better.

Captura.JPG

Thanks all for your help

6 REPLIES 6
Anonymous
Not applicable

Disaggregates.png

Anonymous
Not applicable

@Anonymous 

 

PREVIOUSDAY is a time-intel function and works correctly only on proper Date tables, not on any arbitrary tables.

Best
D

Thanks for your reply. I tryed to replacate your formula but all I get is the same content of "Orders_to_Date" column, see:

Captura.JPG

Please advise. Thanks.

Anonymous
Not applicable

i have a similar issue, did you fix it?

Anonymous
Not applicable

Even though it's doable in DAX, you should do it in Power Query. This is where such calculations belong and are easy.

Best
D
Anonymous
Not applicable

yeah,  i went back to power query and add a column with the date -1 day, after that i create another column with the data of that day and the column for the difference

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.