Forum Discussion

Niki's avatar
Niki
Icon for Helper III rankHelper III
6 years ago
Solved

Multiple values in line chart with legend

Hi,

 

I run into the problem of not being able to put multiple values in a line chart and also have a legend. It seems to be it's either a legend or multple values. I think it is really logic to want this, in my case I have column with scores in my dataset, but also a column with the norm/standard. So I want to show both values (which I calculate in a measure), the score in a solid line and the norm in a dashed line in the same color as the score that in belongs to. I would like the legend to show all of those lines and dashed lines, because users must be abl to compare scores to the norm but also to compare scores with eachother.

 

I see some workaround by creating separate measures for every line, but it is not working for me.

Making all the scores and norm into separate measures isn't an option, for 2 reasons: 

1. The categories (which would be the legend) are dynamic, so I need the report to just pick up on every catergory that is in there. 2. When I make certain selections, the legend will keep showing all the measures I make, even though they are not in the selected data, which makes the visual very ugly, full and unclear.

 

Ik think PowerBI still does not have a solution for this or?? Is there any custom visual that can help me out, one that is  very well supported please, because I don't want the report to break on an PBI-update. Hope someone can help me on this! Kind regards, Niki

  • This is a lot of info to put on one single graph. I think you could do it by creating a custom column to use in legend - the column would need to be in a format such as: CategoryA - Norm, CategoryA - Score, CategoryB - Norm, CategoryB - Score, etc
    Then you put the measure in values and the new column as your legend. Your measure would need updating with a switch to check if the type is Norm or Score and then use the correct calculation.

4 Replies