Forum Discussion

EHA_SD's avatar
EHA_SD
Icon for Advocate IV rankAdvocate IV
3 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

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi EHA_SD ,

    Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

    How to Get Your Question Answered Quickly  

    Regards,

    Xiaoxin Sheng