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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
J-ace
Frequent Visitor

Data modelling advice / filtering a table based on unselected filter measure

I am trying to discover the best way possible to approach a problem, the data looks something similar to table A:

 

Jace_3-1676641365707.png

 

I need to allow the user to filter out (deselect from select all) a country, from this I want to display Table B:

Jace_2-1676641308404.png

Jace_1-1676641283911.png

However, I actually need to filter out the categories that are not present in 'Spain', therefore returning something similar to Table C, the average totals for the categories that exist in Spain AND the other countries (if present), but excluding the spain totals:

 

Jace_4-1676641562948.png

One approach I have tried it to create an independent table: 'Distinct Country':

 

Distinct Country = SUMMARIZE('Table A','Table A'[Country],'Table A'[Category])

 

With an unselected country measure used to filter the table:

 

 Unselected Country Measure =

var _1 = except(All('Table A'[Country]), allselected('Table A'[Country]))

return

calculate(countrows('Distinct Country'), filter('Distinct Country', 'Distinct Country'[Country] in _1))
 
 Distinct Country Table With Measure Added:
Jace_6-1676642244359.png

 

 
This returns the filtered result, but I am struggling to filter the original table based on these results, any suggestions would be appreciated or alternative methods to achieving the same result
 
Many thanks in advance!

 

 

1 ACCEPTED SOLUTION

There is no way to "select all but one" elements in a slicer. 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

There are multiple red flags here.  What is the desired behavior when both SPAIN and MEX are deselected?

Thanks for the reply, for now there is no requirement for multi-select, only single-select filters.

There is no way to "select all but one" elements in a slicer. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.