Forum Discussion

EHA_SD's avatar
EHA_SD
Advocate IV
2 years ago

Cannot hide two dynamic reference lines on same chart

If you have two dynamic reference lines on the same chart if you use a multi-select field parameter then you can uncheck to hide one reference line, but unchecking the second one causes the value to be set to 0 and not blank and it will still show on the chart.

LOD reference line =
    VAR _RawSignalSelected = IF(SELECTEDVALUE('Indicator parameter'[Indicators])="'Measures Table'[Raw 7-day moving average]",TRUE(),FALSE())
    VAR _SelectedRefLine = IF("'Limits of quantification and detection by disease'[Limit of detection (LOD)]" IN ALLSELECTED('Reference lines'[Reference lines Fields]) && ISFILTERED(('Reference lines'[Reference lines Fields])) = TRUE(),TRUE(),FALSE())
    VAR _LOD = CALCULATE(MAX('Limits of quantification and detection by disease'[Limit of detection (LOD)]))
RETURN
    IF(_RawSignalSelected && _SelectedRefLine,_LOD,BLANK())
 
LOQ reference line =
    VAR _RawSignalSelected = IF(SELECTEDVALUE('Indicator parameter'[Indicators])="'Measures Table'[Raw 7-day moving average]",TRUE(),FALSE())
    VAR _SelectedRefLine = IF("'Limits of quantification and detection by disease'[Limit of quantification (LOQ)]" IN ALLSELECTED('Reference lines'[Reference lines Fields]) && ISFILTERED(('Reference lines'[Reference lines Fields])) = TRUE(),TRUE(),FALSE())
    VAR _LOQ = CALCULATE(MAX('Limits of quantification and detection by disease'[Limit of quantification (LOQ)]))
RETURN
    IF(_RawSignalSelected && _SelectedRefLine,_LOQ,BLANK())

1 Reply