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
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Users online (1,428)