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
needtoknow
New Member

Calculating difference in data between two slicers and plotting stacked bar chart

I have a table that looks like this:

 

Location Day Product_Name Quantity 
East1Apples10
East1Oranges8
West1Apples15
West1Oranges5
North1Apples12
East2Apples8
East2Oranges12
West2Apples7
West2Oranges8
North1Apples10

 

I would like to get the difference in quantities for each Day and Product_Name between two Locations that are selected in slicers i.e:

 

Slicer 1 (Location): East

Slicer 2 (Location): West

 

The output desired would have the values of Slicer 1 minus Slicer 2 (East minus West) like the table below but in the form of a stacked bar chart with Day on the x-axis, Difference in the y-axis and Product_Name as the stacked categories.

 

Day Product_Name Difference 
1Apples-5
1Oranges3
2Apples1
2Oranges4

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@needtoknow , My video on similar topic can help

Power BI- Compare Categorical Data Using Slicers, Compare Two Brands/Categories/Cities: https://youtu.be/exN4nTewgbc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@needtoknow , My video on similar topic can help

Power BI- Compare Categorical Data Using Slicers, Compare Two Brands/Categories/Cities: https://youtu.be/exN4nTewgbc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Perfect! Thank you @amitchandak

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.