accumulated measure
3 TopicsRolling sales from the last 24 months
Hi, management wants to see the accumulated sales until now vs the accumulated sales from the last two years in a graphic displaying the last 24 months. I have written this measure for the rolling numbers, thinking that MAX Date was related to our current time (today). Instead, Max date looks at row level and so it computes rolling numbers backwards, which is not what we want. Sales cumulated rolling = CALCULATE ( [Total Sales], DATESINPERIOD ( 'Datetable'[Date], MAX ( 'Datetable'[Date] ), -24, MONTH )) With this, I will see the accumulated sales with May 2022 as a label but including numbers from 2020. What I need is basically the raw numbers since January 2022, accumulated. I have looked around, but I am lost. Can someone help here? Thanks! Pauline.1.6KViews0likes4CommentsHow to stop accumulated measure
I want to conduct a study on the lifespan of products. For this purpose, I have created a measure that accumulates sales by years elapsed since the launch. The formula is as follows: SUM('Sales'[Sales Amount]), FILTER( ALL('Years since launch'), 'Years since launch'[Years since launch] <= MAX('Years since launch'[Years since launch]) ) The resulting graphic will be this What happens? If we look at the example of 2016, the curve remains flat from year 8 onwards because from 2016 to 2023, 7 years have elapsed and there are no sales from year 8 onwards. How should the DAX formula for accumulated sales be so that when the value of the x-axis is greater than the difference between today and the launch year, the calculation is interrupted? Thanks in advance JavierSolved789Views0likes2Comments