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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mws5872
Helper II
Helper II

Conditional line styling for line chart

I have actual and forecast numbers that I am working with and each week and over time actuals will replace the forecast values for the line graph. I want it to be the same line where actuals should be black and forecast should be a dotted line. Is there a way to do conditional line style where certain data points we dont have actuals for ? I dont know if this is possible maybe there are 3rd party visuals out there that can do it? Here is a screen shot of what I am trying to do. 

 

 

mws5872_0-1616619334373.png

I basically layered multiple line charts on top of each other to make this effect.... is there another way ? 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @mws5872 ,

 

On this case you need to add two measures in orde to have two different lines and then make the individual value for each one.

 

Something similar to:

Actuals = IF(Max(Table[Date])<= Today(), sum('Table'[Actual]))

Forecast measure = IF(Max('Table'[Date])= Today(),sum('Table'[Actual]),  IF(Max('Table'[Date])> Today(),sum('Table'[Forecast])))

 

Be aware of the forecast line that you need to add on the current date the actuals values  this is for the lines to be linked otherwise they will appear with a break.

 

MFelix_0-1616759510231.png

 

Then just do a customized format of the shapes for each measure.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





View solution in original post

1 REPLY 1
MFelix
Super User
Super User

Hi @mws5872 ,

 

On this case you need to add two measures in orde to have two different lines and then make the individual value for each one.

 

Something similar to:

Actuals = IF(Max(Table[Date])<= Today(), sum('Table'[Actual]))

Forecast measure = IF(Max('Table'[Date])= Today(),sum('Table'[Actual]),  IF(Max('Table'[Date])> Today(),sum('Table'[Forecast])))

 

Be aware of the forecast line that you need to add on the current date the actuals values  this is for the lines to be linked otherwise they will appear with a break.

 

MFelix_0-1616759510231.png

 

Then just do a customized format of the shapes for each measure.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.