Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
I have a line chart with multiple values on it. There is legend at the top that is too long. It is listing out all the values I used. I still want the values to appear as line chart but I don't want the labels to appear at the top. Is there a way to hide the ones I don't want to see? I created the chart by putting the values into the Y-axis box in the line chart visual. I did not use the Legend box.
Thank you
Solved! Go to Solution.
Hi @mj2024 ,
Here I have a easy way, you may try Field parameter.
In my sample there are five measures. I only need to show Measure1/3/5 and hide Measure2/4.
We can use the Field Parameter function to prioritize the measures that need to be shown when adding measures, and add the ones that need to be hidden afterwards.
Here we add Measure1/3/5 first and add Measure2/4 afterwards.
Field Parameter will sort the measure according to the order we add it.
Create a Line chart.
Then Insert a rectangle from Shapes. Set the color of it as white.
Move it to hide the legends we don't need. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @danextian
Can you help me with this? The scales are off when I follow your steps. Is there a way to prevent the scale from changing when the legend is removed?
Thank you
Hi @mj2024 ,
Here I have a easy way, you may try Field parameter.
In my sample there are five measures. I only need to show Measure1/3/5 and hide Measure2/4.
We can use the Field Parameter function to prioritize the measures that need to be shown when adding measures, and add the ones that need to be hidden afterwards.
Here we add Measure1/3/5 first and add Measure2/4 afterwards.
Field Parameter will sort the measure according to the order we add it.
Create a Line chart.
Then Insert a rectangle from Shapes. Set the color of it as white.
Move it to hide the legends we don't need. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I figured out how to make the backgrounds transparent so if I overlay one then I can see both. The problem is that the scales are off. Once I remove the legend then the scale increases to fill up the missing space. The Y-axis scale for both with legend and and without legend needs to always be the same. How can I do this?
Its not working for me. Does someone have a video that shows what to do?
@mj2024 Follow these steps:
Step 1: First take your actual visual where you want to show everything. But hide the title of this visual:
Step 2: Take another line chart visual and do the following setting as per below screenshot and do not hide the title for this chart. And off course keep the those legend values which you only want
Step 3: Arrange both these visuals as shown in below screen shot:
Step 4: Final result is...
Those individual measures will still be treated as a legend. If you want to exclude one of them from the legend without removing its own line, please refer to my initial reply.
Proud to be a Super User!
Hello @mj2024 ,
so you have this visual that has all data
you go to filter pane and select the legend field (example country as in screenshot), then unselect the ones you dont want to show.
Proud to be a Super User! | |
Hi @mj2024
The only time you can exclude a legend tied to a visual if the value for that legend returns blank or you exclude through filters. What you can do is use two separate visual :
Proud to be a Super User!
Hi @danextian
I followed your steps. There are two copies of the visual but when I overlay them then one covers the other so I cannot see the one that is below it. What do you suggest?
Thank you
Make sure the viz that has the legend has Responsive turned off and then resize it.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
146 | |
85 | |
66 | |
52 | |
48 |
User | Count |
---|---|
215 | |
90 | |
83 | |
67 | |
59 |