Forum Discussion
wdbirch19
2 years agoNew Member
Plotting difference in value between two date ranges
Hi PowerBI community! I've been going round in circles for a couple of days trying to figure this one out so I decided to reach out for some help. I'm working with some time series data (exam...
- 2 years ago
Hi wdbirch19
Would something like this help?
zMeasure = VAR _StartDate = MIN( 'Table1'[Date] ) VAR _EndDate = MAX( 'Table1'[Date] ) VAR _StartVal = CALCULATE( MAX( 'Table1'[Value] ), 'Table1'[Date] = _StartDate ) VAR _EndVal = CALCULATE( MAX( 'Table1'[Value] ), 'Table1'[Date] = _EndDate ) VAR _Diff = _EndVal - _StartVal RETURN _Diff OR zMeasure 2 = CALCULATE( MAX( 'Table1'[Value] ), 'Table1'[Date] = MAX( 'Table1'[Date] ) ) - CALCULATE( MAX( 'Table1'[Value] ), 'Table1'[Date] = MIN( 'Table1'[Date] ) )I hope this helps.