Forum Discussion
laciodrom_80
9 years agoHelper IV
Reference lines on demand
Hi, I've got a report with a line chart, I wish add to my report a reference line on demand: in particular I'd like to have a filter which specifies some reference lines (max - min - mean, etc.) ...
- 9 years ago
hi laciodrom_80
First create a table with a column with Max, Min , Average ...Use this to show a slicer to select the calculate formula of the line.
Next, create a measure to calc accord to slicer selected.
LineCalc = IF ( VALUES ( Table1[Value] ) <> BLANK (), IF ( HASONEVALUE ( Table2[LineType] ), SWITCH ( VALUES ( Table2[LineType] ), "Max", CALCULATE ( MAX ( Table1[Value] ), ALLSELECTED ( Table1 ) ), "Min", CALCULATE ( MIN ( Table1[Value] ), ALLSELECTED ( Table1 ) ), "Average", CALCULATE ( AVERAGE ( Table1[Value] ),ALLSELECTED ( Table1 ) ) ) ), BLANK () )
v-haibl-msft
9 years agoMicrosoft Employee
Just upload a simple .pbix file here for reference which follow the solution provided by Vvelarde.
If you have legend in your line chart, as Vvelarde said, you cannot have more than one value in the Values field now. Please vote this idea here.
Best Regards,
Herbert
laciodrom_80
9 years agoHelper IV