cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
muren Frequent Visitor
Frequent Visitor

Cumulative sales monthly and yearly

Hi,

 

I want to create a chart which shows the cumulative sales of an order table with the month on the axis and my year on the legend.

Currently, I have the following formula to calculate the cumulative 

Cumulative sales = CALCULATE(SUM(orders[Sales Value]);FILTER(ALL('Date');'Date'[Date] <= MAX('Date'[Date])))

But when I create the visual. I get this: Knipsel.PNG 

So it should reset every year but instead continues to count.

 

Any help?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Cumulative sales monthly and yearly

Hi muren,

 

Modify your measure using DAX below and check if the issue can be resolved:

Cumulative sales =
TOTALYTD ( SUM ( orders[Sales Value] ), Date[Date] )

Regards,

Jimmy Tao

 

3 REPLIES 3
mwegener Member
Member

Re: Cumulative sales monthly and yearly

Hi @muren

 

use the Quick measure "Year-to-date total".

Community Support Team
Community Support Team

Re: Cumulative sales monthly and yearly

Hi muren,

 

Modify your measure using DAX below and check if the issue can be resolved:

Cumulative sales =
TOTALYTD ( SUM ( orders[Sales Value] ), Date[Date] )

Regards,

Jimmy Tao

 

muren Frequent Visitor
Frequent Visitor

Re: Cumulative sales monthly and yearly

Thank you, it was the solution I searched for