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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Subtract Values Based on Two Slicer Selections

I am working with survey response data.  I have data for different years (in same format) and data for different org codes.  I can currently select multiple org codes from slicer to see the data, but I would like to add a column to subtract the difference based on the selected slicers so I can see which orgs did better than the others.  But I can't figure it out.   

 

New Power Bi user and I would great appreciate your help as I am learning how to use the program. 

My fields are Org (ST10, ST11, ST12, etc), Pos (this is the value), Date, & Quest #.  Here's snapshot of my data:

 

tpierce_0-1713903893323.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Create 2 tables, then put the field into the slicer.

slicera=summarize('table','table'[Org])
slicerb=summarize('table','table'[Org])

Create a measure.

 

Difference in Pos =
var _selecteda=selectedvalue(slicera[org])
var _selectedb=selectedvalue(slicerb[org])
VAR Org1Value =
    CALCULATE ( SUM ( 'Table'[Pos] ), 'Table'[Org] =_selecteda )
VAR Org2Value =
    CALCULATE ( SUM ( 'Table'[Pos] ), 'Table'[Org] =_selectedb )
RETURN
    Org1Value - Org2Value

 

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Create 2 tables, then put the field into the slicer.

slicera=summarize('table','table'[Org])
slicerb=summarize('table','table'[Org])

Create a measure.

 

Difference in Pos =
var _selecteda=selectedvalue(slicera[org])
var _selectedb=selectedvalue(slicerb[org])
VAR Org1Value =
    CALCULATE ( SUM ( 'Table'[Pos] ), 'Table'[Org] =_selecteda )
VAR Org2Value =
    CALCULATE ( SUM ( 'Table'[Pos] ), 'Table'[Org] =_selectedb )
RETURN
    Org1Value - Org2Value

 

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors