Forum Discussion
julie_tai
7 years agoFrequent Visitor
Create a dynamic reference line for tracking 12 months
As a beginner, I searched lots of articles, and it worked out with showing the visual data for tracking 12 months. Now there is another problem, which is, I would like to use the last-month average ...
- 7 years ago
Hi ryan_mayu
Try below measure:
Measure = VAR CurrentDate = MAX ( 'Date-2'[Date] ) VAR PreviousDate = DATE ( YEAR ( CurrentDate ), MONTH ( CurrentDate ) - 11, 1 ) RETURN IF ( MAX ( 'Date'[Date] ) >= PreviousDate && MAX ( 'Date'[Date] ) <= CurrentDate, CALCULATE ( [Demand Charge per Train] + [Energy Charge per Train], FILTER ( ALLSELECTED ( 'Date' ), 'Date'[Date] = CurrentDate ) ) )Regards,
Cherie
Ashish_Mathur
Super User
7 years ago