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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
deepanwita25
Advocate III
Advocate III

Connecting lines between a point from the line chart to a point on the error bar

deepanwita25_0-1740474250096.png

I have created a graph like this. The slicers represent Country/Product/Measure chosen.

 

The light blue line in the graph depicts Actual value. The light blue dotted line depicts the value forecasted.

 

The grey markers depicted with error bar shows predicted values at that time point. Eg. March 2024 has a blue dot which is ACtual and a grey dot which is Predicted for March 2024. There is also a slicer called "Time Ahead from the Last Data Available". It denotes in this case, March 2024 was predicted 2 months ago in Jan 2024.

 

Similarly for other points, Nov 2024 (grey marker value) was predicted 2 months ago in Sep 2024. Is it possible to do something like shown below. If yes, how, can someone help me please:


deepanwita25_1-1740474711032.png

 

 

4 REPLIES 4
deepanwita25
Advocate III
Advocate III

Hi I have created the table as suggested

deepanwita25_0-1740494790079.png

I have the common Month&Year
Value represents the Actual Values
Predicted_1M Prior represents the corresponding Predicted values for that month
As you suggested, I have created a linking column called Date_1M Prior which is Date-1 month for me for Predicted_1M Prior col..It signifies 1 month ago. Feb 2024 was predicted in Jan 2024 and the predicted value is given by Predicted_1M Prior.

After this I cant follow how to create a link between ACtual and Predicted Values. Can you help me here please?

I could just create 2 line chart based on the data in the new table I posted above and it looks like this:

deepanwita25_1-1740495032745.png

How do I connect these 2 lines

deepanwita25
Advocate III
Advocate III

Hello, Thank you for you solution. I am trying it and will let you know if this works!

freginier
Super User
Super User

Hey there!

 

If I understand correctly, you want to connect the actual value (blue dot) to the predicted value (grey dot with error bar) in the line chart. Currently, the actual and forecasted values are plotted separately, but they need a visual connection.

Power BI does not natively support connecting separate data points directly with custom lines, but we can use a workaround:

1. Create a new table that contains Actual MonthYear, Forecast MonthYear, and the Actual/Forecast values in the same row.( This ensures that each actual value has a corresponding predicted value.)

2. Add a calculated column to link the actual and forecasted values by MonthYear. Example: PredictionDate = ActualDate + TimeAheadMonths

3. Scatterplot for actual values (blue dots). Line chart for forecasted values. Also ensure that both are using the same X-axis (MonthYear).

This will visually connect actual and forecasted values but will not be a "true" connection line.

 

If this doesn't work, you can also use a DAX formula. 

LineConnector =
VAR ActualValue = SELECTEDVALUE( ActualsTable[ActualValue] )
VAR ForecastValue = SELECTEDVALUE( ForecastTable[PredictedValue] )

RETURN
IF(
NOT(ISBLANK(ActualValue)) && NOT(ISBLANK(ForecastValue)),
(ActualValue + ForecastValue) / 2, // Find midpoint for a smooth connection
BLANK()
)

 

This creates a dynamic "midpoint" that can be plotted to simulate a connection between the two.

 

Hope this helps!

😁😁

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors