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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
icdns
Post Patron
Post Patron

Conditional Line Chart

Hi,  

 

I would like to ask for help if it's possible to create a conditional format for my line visual. 

Example: The top 3 line will be a BLUE (darker shade) the rest will be BLUE (lighter shade) 

 

 

Thank you! 

 

 

-IC

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

hI @icdns ,

Since in a line chart, a value field is plotted continuously, there is no segmentation for the same field.
And when the value of one field is used to draw a line chart with two fields, it will not be able to draw continuously.

Since you did not provide specific data, you can refer to the template below, the principle is the same.(Currently you mentioned that only the first three rows and the data that follows need to be in a different MEASURE)

 

vluwangmsft_0-1646705814555.png

 

Then for the above case, only the above goal measure is needed, and what is not a above goal would be the below goal.

So what we need is the [Sales Actual running total] and the above goal measure, the below goal measure will no longer be needed and the line will be continuous at this point.

Note that the above goal measure is below the running total.

vluwangmsft_1-1646705814141.png

 

vluwangmsft_2-1646705815006.png

 

In other words, running sales totals are "below goal" and are shown in red, and above goal measure are still shown in green.

vluwangmsft_3-1646705814355.png

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

View solution in original post

3 REPLIES 3
v-luwang-msft
Community Support
Community Support

hI @icdns ,

Since in a line chart, a value field is plotted continuously, there is no segmentation for the same field.
And when the value of one field is used to draw a line chart with two fields, it will not be able to draw continuously.

Since you did not provide specific data, you can refer to the template below, the principle is the same.(Currently you mentioned that only the first three rows and the data that follows need to be in a different MEASURE)

 

vluwangmsft_0-1646705814555.png

 

Then for the above case, only the above goal measure is needed, and what is not a above goal would be the below goal.

So what we need is the [Sales Actual running total] and the above goal measure, the below goal measure will no longer be needed and the line will be continuous at this point.

Note that the above goal measure is below the running total.

vluwangmsft_1-1646705814141.png

 

vluwangmsft_2-1646705815006.png

 

In other words, running sales totals are "below goal" and are shown in red, and above goal measure are still shown in green.

vluwangmsft_3-1646705814355.png

 

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

 

We have this workaround which is simple to implement

 

Conditional Format a line chart in Power BI - Select Distinct

amitchandak
Super User
Super User

@icdns , conditional color on a line visual is not possible. You can only get color markers that too when you have only one line. If you are using a legend that is also not possible

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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