Forum Discussion
Cumulative sales
- Anonymous2 years ago
Hi, Fistachpl
I create a sample table:
First, create a new column to show month number:
MonthNumber = MONTH('Table'[Date])Then create a new measure and try to use the following dax:
Cumulative Sales = CALCULATE( SUM('Table'[Sales]), FILTER( ALLSELECTED('Table'), 'Table'[MonthNumber] <= MAX('Table'[MonthNumber]) ) )Put this measure in table visual, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Fistachpl
I create a sample table:
First, create a new column to show month number:
MonthNumber = MONTH('Table'[Date])
Then create a new measure and try to use the following dax:
Cumulative Sales =
CALCULATE(
SUM('Table'[Sales]),
FILTER(
ALLSELECTED('Table'),
'Table'[MonthNumber] <= MAX('Table'[MonthNumber])
)
)
Put this measure in table visual, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.