cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheShinigami
New Member

DAX formula for cumulative sales in the correct sorting order

 

Hi,

 

I am trying to show the cumulative net sales but as you look at the date, the numbers are in descending order. It should be in ascending order because after each date the sales numbers increase.   Is there a formula to fix this?

 

 

 

 

 

1 ACCEPTED SOLUTION
Tanushree_Kapse
Solution Supplier
Solution Supplier

Hi @TheShinigami ,

 

Use the following measure to calculate the cummultive Sales:

Measure=  CALCULATE([New Sales - Actual CP ], FILTER(ALLSELECTED(Dim InvoiceDate [Invoice_Date]), Dim InvoiceDate [Invoice_Date] <= MAX(Dim InvoiceDate [Invoice_Date])))

 

 

Mark this as a solution, if I answered your question. Kudos are always appreciated.

Thanks!

View solution in original post

3 REPLIES 3
Tanushree_Kapse
Solution Supplier
Solution Supplier

Hi @TheShinigami ,

 

Use the following measure to calculate the cummultive Sales:

Measure=  CALCULATE([New Sales - Actual CP ], FILTER(ALLSELECTED(Dim InvoiceDate [Invoice_Date]), Dim InvoiceDate [Invoice_Date] <= MAX(Dim InvoiceDate [Invoice_Date])))

 

 

Mark this as a solution, if I answered your question. Kudos are always appreciated.

Thanks!

View solution in original post

God blessssssssss you!!!!!!!!!!

 

 

I need to have you on speed dial 😋

Happy to help!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.