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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
WulffJoergen
Helper I
Helper I

How to use Error bars in line chart with measures in field parameters slicer

Hi User Group

I have a line chart that shows either Total profit or Total revenue depending on what I choose in a field parameter.

I would like to create an error bar, where my Upper Bound shows the difference to last years Total Profit or last years total revenue.

So Y axis is either Total Profit or Total Revenue and X axis is the month this year.

I tried to let Chat GPT suggest a solution and was given this choice:

DynamicErrorMeasure =
SWITCH(
TRUE(),
SELECTEDVALUE(Parameters[Parameter]) = "Measure1", [Measure1_Error],
SELECTEDVALUE(Parameters[Parameter]) = "Measure2", [Measure2_Error],
BLANK()
)

But as soon as I put it in my visual creates an error and I do not get the possibility to undo, what I just did.

Can anybody help me with a solution that can generate a workaround for this?

I have created below graf with a hidden line ( 0 ppt) for the PY line. If that was visible, it would look like the second picture

WulffJoergen_0-1726658825351.png   

WulffJoergen_1-1726658854555.png

 

regards
Jørgen

 

1 ACCEPTED SOLUTION
WulffJoergen
Helper I
Helper I

Actually this was easier, than I thought.

Switch the Y axis to a measure that is dependent on the parameter instead of using the parameter value itself. Now you can create the error bar without any problem.

View solution in original post

1 REPLY 1
WulffJoergen
Helper I
Helper I

Actually this was easier, than I thought.

Switch the Y axis to a measure that is dependent on the parameter instead of using the parameter value itself. Now you can create the error bar without any problem.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors