Forum Discussion
kpost
Solution Sage
3 years ago'Rolling' Cumulative Measure value: previous 365 days
I am looking for help with DAX: I am creating a line graph with the date along the X axis. I'm looking to create a measure where for each data point along the x axis, it is calculated by look...
- 3 years ago
kpost You should be able to do this:
Measure = VAR __Date = MAX('Date_Filter'[Date]) VAR __MinDate= __Date - 365 VAR __Result = CALCULATE([Adjusted_%_Value], 'Date_Filter'[Date] >= __MinDate && 'Date_Filter'[Date] <= __Date) RETURN __ResultIf that doesn't work you can try an alternate approach here:
Greg_Deckler
Community Champion
3 years agokpost You should be able to do this:
Measure =
VAR __Date = MAX('Date_Filter'[Date])
VAR __MinDate= __Date - 365
VAR __Result = CALCULATE([Adjusted_%_Value], 'Date_Filter'[Date] >= __MinDate && 'Date_Filter'[Date] <= __Date)
RETURN
__Result
If that doesn't work you can try an alternate approach here:
- kpost3 years ago
Solution Sage
Greg_Deckler Thank you the measure you wrote worked perfectly.