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
Anonymous
Not applicable

Dynamic Legends in Line chart

In my table I have Group, Subgroup, SubSubGroup, Date and Values
When doing a line chart (X = Date, Y = Values) I set as legend the Groups column and it displays X lines according the number of groups, but when filtering wether Group, Subgroup or SubSubGroup it shows me only one line.
So the question is, is it possible to change the Legend so when I apply the filters it shows me the same amount of lines of the corresponding subgroups... 
Ex:

-When I dont apply Group filter, it shows the same number of lines than the amount of Groups

-When I apply a Group filter, it shows the same number of lines as the amount of Subgroups within the Group selected
-When I apply a Subgroup, filter it shows the same number of lines as the amount of SubSubGroups within the Subgroup selected.

 

Thanks in advance!

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try if you can use field parameter in Legend and change that using a slicer

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9afd
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.