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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
upiotrowska
Regular Visitor

Different colors for a single line in a multiline line chart

Hi, I would like to create a line chart as follows: 

upiotrowska_0-1663681835897.png

 

I have created two measurements for actual values (colors) and forecast (grey): 

actual = IF('Table'[Month Number]<= 6, [Sales], BLANK())
forecast = IF('Table'[Month Number]>= 6, [Sales], BLANK())

 

But I also want to have a line per category (4 lines, part color, part grey). I cannot add a field as a legend, when I have two measures on Y axis. How can I achieve this?

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

draw eight separate lines , four for actuals and four for forecast.  Duplicate the data point where the lines touch.

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

draw eight separate lines , four for actuals and four for forecast.  Duplicate the data point where the lines touch.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.