Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
I have a dataset which I need to show on a line chart. It consists of a date/time element (shown on X axis) and up to 3 series. The data represents several monitoring sites which may have up to 3 types of data associated on this chart.
The data is filtered via a slicer in order to allow the user to choose the site shown but not all sites have all 3 types of data available. Obviously, if there is no data for one of the series, nothing can be shown on the chart, but the series is still represented in the legend, since the column the data would be contained in is still part of the dataset.
Somehow, I'd like to hide the name of the series with no data in the legend, as I think it has the potential to confuse users. I can't see a way of dynamically hiding the legend so I'm wondering if maybe you could achieve the result via hiding columns (I have considered whether or not you could reproduce the table using dax and only represent columns that have data under the current filter conditions but am not 100% sure how to do this)
Does anyone have any suggestions or is this something we're going to have to live with?
I should also add that I've tried unpivoting the data but that doesn't work since the 'event period' series needs to be on the secondary y axis. Leaving that column out of the unpivot doesn't work either, as it's impossible to drag or otherwise force the series onto the secondary Y
@DarrenW , I checked out my data. When the data is blank it does not show the legend. Make sure is blank, not 0
Avoid any +0 or coalesce or null/blank handing
This did not answer my question
I'm not seeing this behaviour on a line chart. See screen shot. Outfall Depth column has no data. there are zeros in the data and they are displayed as expected (and I need them to be)