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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
kash123
Frequent Visitor

Creating a Bar chart where its value is the difference between the two lines already on chart

Hi 

 

I have some data which I have already put into a chart. The lines are completely independent and I have 2 sets of filters which control them respectively (I have attached the data and the dashboard)

 

I want to create a bar chart that shows the difference between the values of the two lines. Can't seem to get it to work? Ideally on the same chart or on a seperate chart works as well!

 

Thanks

 

 

Data

https://docs.google.com/spreadsheets/d/14JwRvhuriWSnXynf0rB_hycxCP5q95Qb/edit?usp=sharing&ouid=10667...

Dashboard

https://drive.google.com/file/d/1Ko3nPOIWfM8M6HGOfFTiOI8tRp9J-Ggi/view?usp=sharing

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @kash123 ,

 

you can add a measure that is calculating the difference:

Diff Sales Curves = SUM( 'Table Curve 1'[Sales (Millions)] ) - SUM( 'Table Curve 2'[Sales (Millions)] )

 

This measure you can then put into a bar chart as you wanted:

selimovd_0-1628607371333.png

 

Or for example in a Line and Stacked Column Chart:

selimovd_1-1628607442572.png

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @kash123 ,

 

Measure is

Difference = SUM( 'Table Curve 1'[Sales (Millions)] ) - SUM( 'Table Curve 2'[Sales (Millions)] )

 

Put it into the secondary values

10.png

 

 

Best Regards,

Stephen Tao

 

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

 

selimovd
Super User
Super User

Hey @kash123 ,

 

you can add a measure that is calculating the difference:

Diff Sales Curves = SUM( 'Table Curve 1'[Sales (Millions)] ) - SUM( 'Table Curve 2'[Sales (Millions)] )

 

This measure you can then put into a bar chart as you wanted:

selimovd_0-1628607371333.png

 

Or for example in a Line and Stacked Column Chart:

selimovd_1-1628607442572.png

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.