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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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