Forum Discussion
How to recreate this excel visual?
Here is a pic. I can't figure out how to do the lines the same way? Any help is appreciated, thanks!!
You can build that in Power BI with a clustered column chart + error bars.
Those small yellow/green “ticks” are just the caps of error bars plotted for an
(invisible) series.Steps
1. Measures
-- your two bars
[Actual A] := ...
[Actual B] := ...-- target lines (the y-values where the short dashes must appear)
[Target Green] := ...
[Target Yellow] := ...-- dummy measures to host the error bars
[Dummy Green] := 0
[Dummy Yellow] := 02. Visual
- Add a Clustered column chart.
- Axis → your category.
- Values → [Actual A], [Actual B], [Dummy Green], [Dummy Yellow].
- In Data colors, set the two Dummy series to 100% transparent (so their columns are invisible).
3. Error bars → for each Dummy series
- Turn Error bars = On.
- Type = By field.
- Direction = Upper only.
- Upper bound = [Target Green] (or [Target Yellow] for the other).
- Lower bound = [Target Green] (same as upper, so length = 0).
- End style = Cap; adjust Cap length to taste.
- Choose the Line color (green/yellow).
Result: two short horizontal caps (ticks) at the specified y-values above each category, with your two columns below—visually matching the Excel chart.
I hope it helps.
2 Replies
- Ilgar_ZarbaliSuper User
You can build that in Power BI with a clustered column chart + error bars.
Those small yellow/green “ticks” are just the caps of error bars plotted for an
(invisible) series.Steps
1. Measures
-- your two bars
[Actual A] := ...
[Actual B] := ...-- target lines (the y-values where the short dashes must appear)
[Target Green] := ...
[Target Yellow] := ...-- dummy measures to host the error bars
[Dummy Green] := 0
[Dummy Yellow] := 02. Visual
- Add a Clustered column chart.
- Axis → your category.
- Values → [Actual A], [Actual B], [Dummy Green], [Dummy Yellow].
- In Data colors, set the two Dummy series to 100% transparent (so their columns are invisible).
3. Error bars → for each Dummy series
- Turn Error bars = On.
- Type = By field.
- Direction = Upper only.
- Upper bound = [Target Green] (or [Target Yellow] for the other).
- Lower bound = [Target Green] (same as upper, so length = 0).
- End style = Cap; adjust Cap length to taste.
- Choose the Line color (green/yellow).
Result: two short horizontal caps (ticks) at the specified y-values above each category, with your two columns below—visually matching the Excel chart.
I hope it helps.
- jmartinntiRegular Visitor
Thanks!!