Forum Discussion
Is there a way to connect two columns in a clustered column chart with a calculated line?
I have a clustered column chart that looks at three aspects from a sale. Is there anyway I can show the difference between two columns and have that difference shown as a line wihtin the chart? See below for current and desired views.
Current
Desired
2 Replies
- BeaBF
Super User
PBIGuy25 Hi! no in this way it is not possible, but a workaround is to set constant lines and then add a card at the end of the barchart, in this way:
click on the graph and select:BBF
๐ก Did I answer your question? Mark my post as a solution!
๐ Kudos are appreciated
๐ฅ Proud to be a Super User!
- grazitti_sapna
Super User
Hi PBIGuy25
- Create a Dax to find diiference between two columns
GrossVsDiscount_Diff = SUM(Sales[GrossValue]) - SUM(Sales[Discount]) - Add a Line and Clustered Column Chart.
- Go to Visualizations โ Line and Clustered Column Chart.
- Put your three measures (Gross Value, Discount, Profit) in the Column values.
- Put your new difference measure in the Line values.
This way, your chart will show all three metrics as bars and the variance as a line.
๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together!
- Create a Dax to find diiference between two columns