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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous97
Frequent Visitor

Line chart show multiple lines based on selected values

Hello,

I have a requirement for line chart where i need to show to the no.of lines based on the selected filter

x axis- Text column(test1)

y axis- range from 0 to 6(test2)

legend - text column(values)

I have columns id, test1, test2, values and slicers for id and measure , if a user selects 2 different id's i have to show 2 different lines but the issue is here for example 

id =1, text1=abc,text2=0.6,legend=xyz

id=2,text1=abc,text2=0.6,legend=xyz

in Slicer if I select two id's it is giving me single line with adding the values 0.6+0.6. Is there any possibility to achieve this.

 

  • Thanks in advance.
3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous97 

 

With 'values' in the Legend field, Power BI will attempt to create a separate line for each unique value in the 'values' column. If 'values' is the same for both 'id' = 1 and 'id' = 2, Power BI will naturally try to combine these because it sees them as not distinct. If you want separate lines for each 'id' , you can create a new column that concatenates  'id' and 'values' to make them unique and then put the new column in legend.

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @Anonymous ,

 

Thank you for the reply.

I have already tried this by concatenating the id and value and I was able to acheive the requirement, but when we hover over the legend it is showing both id and values concatenated and the user only wants to see the values.

 

Anonymous
Not applicable

Hi @Anonymous97 

 

You only need to make sure that the values of the legends of id=1 and id=2 are not the same, not necessarily the splicing of id and value.

 

 

Best Regards,

Jayleny

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.