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
kovacikm78
Frequent Visitor

How to hide lines in a Line and column chart with field parameters

Hi guys,
I have a Line and Clusterd column chart. Primary Y axix (columns) and secondary Y axis (lines) are based on Field parameters. So I have two slicers with multiselect option where I can choose various matrics to be shown on the chart.
I am dynamicaly choosing metrics for columns and lines. The problem is, when I unselect all checkboxes in the line slicer, I get no data on the chart. In this case, when I unselect all lines checkboxes and leave only checkbox for columns, I want to see only columns in the chart. But I am not able to achieve this goal.

Can you please help me with this?
here is the example of my visual. On the left side is the slicer for columns (blue) and lines (pink):
In this case I should see only columns in my chart (but my chart is blank...)

kovacikm78_0-1689108985067.png

this should be the final result:

kovacikm78_1-1689109203700.png

example of my fields parameter for lines

Thank you very much for your help in advance

CHART_Lines = {
           ("Turnover", NAMEOF([Turnover]), 0),
         ("Margin", NAMEOF([Margin]), 1)
....
}

 

1 REPLY 1
lbendlin
Super User
Super User

 

The problem is, when I unselect all checkboxes in the line slicer, I get no data on the chart.

 

I don't think so.  In Power BI one of the weirder paradigms is that "Nothing selected" is (mostly) the same as "everything selected".

 

lbendlin_0-1689514655120.png

lbendlin_1-1689514671004.png

lbendlin_2-1689514687082.png

see attached

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.