Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
EHA_SD
Advocate III
Advocate III

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.
ReferenceLineProblem.png

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 1
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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.