Forum Discussion
Adrien_86
2 years agoNew Member
Rolling performance measure
Hello everyone, I'd like to ask you about a little problem I'm having with Power Bi. I want to create a dynamic graph with the following inputs: dates (x-axis) and sliding performance (y-axis) ...
- 2 years ago
If it fits your needs try this for your model:
Performance = VAR _MIN = CALCULATE( MIN('Calendar'[Date]), ALLSELECTED('Calendar'[Date]) ) VAR _MAX = CALCULATE( MAX('Calendar'[Date]), ALLSELECTED('Calendar'[Date]) ) VAR _MIN_Value = CALCULATE( [SUM Course], 'Calendar'[Date] = _MIN) VAR _MAX_Value = CALCULATE( [SUM Course], 'Calendar'[Date] = _MAX) VAR _DIVIDE = DIVIDE([SUM Course], _MIN_Value) * 100 RETURN IF( HASONEVALUE('Calendar'[Date]), _DIVIDE)
sergej_og
2 years agoSuper User
Ah ok,
so it is a simple date slicer with a slider.
So you define MIN and MAX dates for your purpose.
Right?
Adrien_86
2 years agoNew Member
Yes exactly
- sergej_og2 years agoSuper User
Hey Adrien_86 ,
sthg like this?After change your MIN Date using a slicer it will look like this:
New reference value is then your new MIN Date selected.That´s what you wanted to see?
Line Chart:- sergej_og2 years agoSuper User
If it fits your needs try this for your model:
Performance = VAR _MIN = CALCULATE( MIN('Calendar'[Date]), ALLSELECTED('Calendar'[Date]) ) VAR _MAX = CALCULATE( MAX('Calendar'[Date]), ALLSELECTED('Calendar'[Date]) ) VAR _MIN_Value = CALCULATE( [SUM Course], 'Calendar'[Date] = _MIN) VAR _MAX_Value = CALCULATE( [SUM Course], 'Calendar'[Date] = _MAX) VAR _DIVIDE = DIVIDE([SUM Course], _MIN_Value) * 100 RETURN IF( HASONEVALUE('Calendar'[Date]), _DIVIDE)- Adrien_862 years agoNew Member
Yes this is exactly what I'm looking for ! thank you so much !!!