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

Join 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.

Reply
zbpor
Frequent Visitor

Multiple series line chart with conditional formatting for line color

Hi All,

 

I'm trying to get multiple lines chart like with using column in legend (below) but I would like to have a freedom to use conditional formatting for changing series colors. In Tableau it is really easy to do it, as there there is seperate field for defining detial and color of plot. 

I failed with getting what I want by using standard PBI line chart. Perhaps anyone ise familiar with a custom line chart which allows me to create desire

 

zbpor_0-1663311475837.png

 

8 REPLIES 8
lbendlin
Super User
Super User

I failed with getting what I want by using standard PBI line chart

Can you please elaborate - this is relatively standard functionality. What have you tried and where are you stuck?

Hi @lbendlin ,

 

I have dragged and dropped column to the legend field to break down the chart tu multiple series (Attached image above). Now I would like to instead of relying of auto-generated line colors, define my own condition for coloring series.

 

Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Hi @lbendlin,

I have attached PBI report which is based on PBI's sample dataset Test report.

I would like to apply condition formatting to line coloring, and not change each line color indivually.

 

zbpor_0-1663513607660.png

zbpor_1-1663513721272.png

 

 

First step is to create a measure or calculated column to define the color. In your case a calculated column is sufficient.

Color = SWITCH(financials[Country],"Canada","#118DFF","France","#12239E","Germany","#E66C37","Mexico","#6B007B","#E044A7")

Then you can apply that field in your formatting. Well, you could if that feature would work. I was really sorprised that this is either not enabled or still broken from the implementation of the new formatting pane. 

lbendlin_0-1663526314498.png

Ironically it makes it look like it works for the data labels. But when you apply the rule it will be ignored.

 

lbendlin_1-1663526398958.png

But when you apply the rule it will be ignored.

lbendlin_2-1663526615115.png

 

So yes, this is definitely broken. Sorry!

 

Hi @lbendlin ,

 

Thanks for your reply.

Yeah, this is what I was expcting.

 

Do ye remember if that option was available before they changed formatting pane?

Beacause if so, I could report that to MS.

 

BR

Zbigniew Porzych

Yes, I think this qualifies as an issue.  You can raise it at https://issues.powerbi.com . If you have a Pro license you can consider raising a Pro ticket at https://powerbi.microsoft.com/en-us/support/pro/

Thanks @lbendlin.

I didn't know there is a possibility to raise Pro ticket.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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