cancel
Showing results for
Did you mean: 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  Solution Supplier

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!

3 REPLIES 3  Solution Supplier

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

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

I need to have you on speed dial 😋  Solution Supplier

Happy to help!  