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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
NimaiAhluwalia
Continued Contributor
Continued Contributor

Line chart

Hello All,

 

I have a line chart which I want to create as below, in PBI:

 

NimaiAhluwalia_0-1785425204739.png

 

I can create almost everything but not able to create the deciosn pointers, which are hightlited as the small thick mark on each lines, not sure how can I get that.

 

Below is the table which I want to use.

 

countryForecast Accuracy - 3 month aheadForecast Accuracy - 2 month aheadForecast Accuracy - 1 month aheadDecision Point
Spain84 %83 %99 %56
Brazil96 %95 %97 %50
Italy79 %71 %80 %56
India81 %84 %82 %15
Mexico96 %98 %96 %40
China95 %97 %96 %5
Germany93 %93 %92 %56
United States99 %98 %100 %35
United Kingdom71 %78 %89 %56
3 REPLIES 3
v-saisrao-msft
Community Support
Community Support

HI @NimaiAhluwalia,

Have you had a chance to review the solution shared by @aswathimohan @Ritaf1983? If the issue persists, feel free to reply so we can help further.

 

Thank you.

Ritaf1983
Super User
Super User

Hi @NimaiAhluwalia 

Yes, this is possible, but the decision point needs two calculated coordinates:

X position: the negative value of Decision Point, because the chart uses days before the forecast period. For example, a decision point of 56 should be plotted at -56.
Y position: the forecast accuracy at that specific point on the line.

Because the available accuracy values are only at -90, -60, and -30 days, the Y value normally needs to be calculated using linear interpolation.

For example:

Decision Accuracy =
VAR X =
-'Forecast'[Decision Point]

VAR Y90 =
'Forecast'[Forecast Accuracy - 3 month ahead]

VAR Y60 =
'Forecast'[Forecast Accuracy - 2 month ahead]

VAR Y30 =
'Forecast'[Forecast Accuracy - 1 month ahead]

RETURN
SWITCH (
TRUE (),

X >= -90 && X <= -60,
Y90
+ DIVIDE ( X + 90, 30 )
* ( Y60 - Y90 ),

X > -60 && X <= -30,
Y60
+ DIVIDE ( X + 60, 30 )
* ( Y30 - Y60 ),

X > -30 && X <= 0,
Y30,

BLANK ()
)

The last condition requires a business decision. For decision points later than 30 days before the forecast, such as 15 or 5 days, you must decide whether to:

keep the one-month accuracy value, as in the example above, or
extrapolate using the slope between the two-month and one-month values.
Native Power BI approach

I would use two aligned line charts:

The first chart contains the normal accuracy lines at -90, -60, and -30.
The second chart contains only one point per country:
X-axis: -[Decision Point]
Y-axis: Decision Accuracy
Legend: Country

Add error bars to the second chart using small upper and lower bounds:

Decision Lower =
[Decision Accuracy] - 0.004

Decision Upper =
[Decision Accuracy] + 0.004

This assumes the percentage is stored as a decimal, such as 0.84. If it is stored as 84, use approximately 0.4 instead.

In the Analytics pane:

Add error bars by field.
Use Decision Lower and Decision Upper.
Set the relationship to Absolute.
Match the error-bar color to the series color.
Hide the regular marker, axes, gridlines, background, and legend on the helper chart.
Give both charts exactly the same X- and Y-axis minimum and maximum values, and place the helper chart over the original chart.

Power BI supports field-based upper and lower bounds and formatting of error-bar width and endpoint markers.

Do not add the decision points directly to the original line series. For countries whose decision point is later than -30, Power BI would extend the line from -30 to the decision point, which is not what the example shows.

For a more robust solution, I would use Deneb and layer:

a line mark for forecast accuracy;
a short vertical rule mark for each decision point.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile
aswathimohan
Advocate I
Advocate I

Hello

 

If possible can you share the python code with which you annotated the graph to get the thick lines ? (I am assuming you used Python since the format looks somewhat similar).  Because whatever I try to do in power bi, the only way to get those lines would be to use reference lines. However, since they run vertically through the entire visual, it might not look very neat when there is more than one country involved.

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

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.

Top Solution Authors