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
rufmau68
Helper III
Helper III

Line chart show a gap if i use both legend and error bars

Hi everybody,

i have data like this Image 20250122_h1122_2121_DataTableSample.jpg

 

and i need to show somethink like this where i have error bars showed, and the line in Y-axis with double color depending on legend value

Image 20250122_h1128_2121_tobe_Legend_NoGap.jpg

but if i select a legend field PBI use 2 colors in the line (good) but create a gap in the line (bad), if i dont select a legend field PBI no gap showed (good!) but color all the line with a single color (bad):

Image 20250122_h1125_2121_legendButWithAGap.jpgImage 20250122_h1124_2121NoGap_but_NoLegend.jpg

https://github.com/mauroruffinocsi/pbi/blob/67d61449d5459a4046e5f826376da72333ebed04/finta%20previsi... 

 

can anyone helps me to optain the desired configuration ?

thanks

bye

mauro

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @rufmau68,

 

The question is that you have gap between both this values on your data when one ends the other one starts

 

Do the following:

 

Create two measures:

Stimato = SUM(Tabella[Valore])
Valore Reale = CALCULATE(SUM(Tabella[Valore]), Tabella[Tipo dato] = "Valore reale")

Now add the measures with stimato first and realle in second then do your error bar based on the stimato:

 

MFelix_0-1737564143290.png

 


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 @rufmau68,

 

The question is that you have gap between both this values on your data when one ends the other one starts

 

Do the following:

 

Create two measures:

Stimato = SUM(Tabella[Valore])
Valore Reale = CALCULATE(SUM(Tabella[Valore]), Tabella[Tipo dato] = "Valore reale")

Now add the measures with stimato first and realle in second then do your error bar based on the stimato:

 

MFelix_0-1737564143290.png

 


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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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