Forum Discussion
Berl21
Helper III
2 years agoRolling 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 rol...
talespin
Solution Sage
2 years agohi Berl21 ,
If you can share pbix file with any sensitive data removed that will help. This is what you can try
Create a Measure(Assuming you have date field in your visual)
//This variable will capture the current date(current filter context).
VAR _dt = SELECTEDVALUE(Date)
//In CALCULATE first you will remove any filter on date table column. Then provide a new filter for sales calculation, Date >= 24 months prior from date in current filter context and less than equal to date in current filter context.
CALCULATE( [Total Sales], ALL(Dates[column in visual]), Date >= EDATE(_dt, -24), Date <= _dt )
If this is not what you want, please explain.