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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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