Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Is there a way to format series based on a field value for Line Charts?
I have a data set with many, many possible series depending on what slicer values are selected (so formatting individually is not a good option). Each series is associated with a label and a hex code color. I'd like to dynamically color each line based on the hex code values, like how other visuals let you do Data Colors / fx / Format By / Field Value. That doesn't seem to be an option in the Line Chart's formatting, and I'm wondering if there's a workaround.
I've made a simplified example with fake data and a fake graph of what I want. Here's an example file. In the example file, I've manually colored each series, but in my actual data that's not feasible since there's a huge pool of possible series that would get updated... I need a way to link it to the Color field.
X | Y | Label | Color |
2000 | 202564 | A | #FF0000 |
3000 | 273856 | A | #FF0000 |
3800 | 324242 | A | #FF0000 |
2085 | 216122 | B | #00FF00 |
3085 | 282371 | B | #00FF00 |
3885 | 344387 | B | #00FF00 |
2170 | 236258 | C | #0000FF |
3170 | 304727 | C | #0000FF |
3970 | 352281 | C | #0000FF |
I'm very new to R, but open to an R Script Visual solution if that's an option.
Hi @ELW ,
According to your needs, some visual can customize the color series by creating a measure in the Format-->Data colors. Here is a related link. I hope to help you solve the problem.Conditional formatting by field value in Power BI - Power BI Docs
If the problem is still not resolved, please provide detailed error information. Let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |