Forum Discussion
Anonymous
9 years agoNot applicable
Calculate index base 100
Hello all, I would like to add indexing feature in my report. In short, user via filter can select which date they want to set as base (for example 1.1.2012). Then: - Value at 1.1.2012 = 100 - V...
- 9 years ago
Hi Anonymous,
You can do ti using this simple steps:
- Add a calendar table to your data but leave it as a standalone table (do not make any relationship with other tables)
- Add a slicer to your report based on the Calendar Table
- Create the following measure on your Data Table
Index 100 = VAR Date_index = MIN ( 'Calendar'[Date] ) RETURN SUM ( Data[Value] ) / CALCULATE ( MAX ( Data[Value] ), Data[Date] = Date_index ) * 100 - If you want to have dates previous to the selected date not being calculated make this changes to your measure:
Index 100 = VAR Date_index = MIN ( 'Calendar'[Date] ) RETURN SWITCH ( TRUE (), MIN ( Data[Date] ) < Date_index, 0, SUM ( Data[Value] ) / CALCULATE ( MAX ( Data[Value] ), Data[Date] = Date_index ) * 100 )
Final result is below:
Regards,
MFelix
MFelix
Super User
3 years agoHi Anonymous ,
If I understood correctly what you need is to change the metric used based on a slicer in this case you can create a parameter field:
Then select the measures you want for your parameter:
Now you can use the slicer to choose:
On the Y axis instead of the measures use the parameter field.
Anonymous
3 years agoNot applicable
That worked wonders, MFelix. Appreciate your assistance, thanks!