Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am plotting athlete reaction time (y-axis) on different days (x-axis). I have 5 athletes and I want each to have their own line, as seen in the example, but I only want four line colors because two of the athletes are taking the same amount of vitamins (80mg). right now the legend is a combination of dose (mg) and ID#, but I really only want four in the legend with just dose. However, if I change my legend to dose, the chart summarizes the pink and yellow lines & only displays one line. Please help, how can I get 5 lines with only 4 in legend. [i realize i could manually change the yellow to pink, but I have about 20 of these charts and I do not want that manual work for each report, also do not want the 5 dots at top (only four).] Thank you!
Solved! Go to Solution.
Thank you so much for looking into this. As a note for other readers, I found that it might be possible with the ggplot2 package from R, but I have not yet tested. Again thank you, and we can close this question.
Hi @MaggiB,
In your scenario, there is no automatic way to change the line color, you have to manually change the yellow to pink. And unless you change the legend to does, you will have 5 dots at top.
Thanks,
Lydia Zhang
Is there a way to do it with R-programming?
Hi @MaggiB,
Based on my reserach, it is not possible to use R to create multiple lines that associate with only one legend.
Thanks,
Lydia Zhang
Thank you so much for looking into this. As a note for other readers, I found that it might be possible with the ggplot2 package from R, but I have not yet tested. Again thank you, and we can close this question.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
71 | |
55 | |
37 | |
32 |
User | Count |
---|---|
71 | |
65 | |
60 | |
50 | |
45 |