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
Anonymous
Not applicable

Exclude members based on selected filters.

Hi

 

Issue on Exclude members based on selected filters.

 

Sample Data:

Table Name:Sample

IDColour
1RED
2RED
3WHITE
4BLACK
5 
6WHITE
7 
8BLACK
9BLUE
10RED

 

Impotance:

if user selects any colour that member count should be exclude.

for example if i selected Colour(red) then my member count should be 7 (10-3)

 

I used logic here:

Step 1: i created below table

Table name:New

Colour1
RED
WHITE
BLUE
BLACK

 

Step 2:I created below mesure 

member var sel=selectedvalue('New'[Colour1])

return

if(sel=selectedvalue(Sample[Colour]),0,1)

 

This measure working fine where we see the visualization in table format. But i need to get member counts in visualization.

 

I need to get below output

FIlter Selection:

Colour
Red
White
Blue
Black

 

Total Count:

10

 

If you user select Colour(Red), my total count should be 7 in visualization.

 

Note:

Selected slicer count should be excluded from my total count.

 

Thanks,

Sai kiran.

 

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

this will work (unless nothing is selected)

 

 

Total Count = calculate(COUNTROWS('Sample'),all('Sample'))- COUNTROWS('Sample')

or simpler

Total Count = COUNTROWS(all('Sample'))- COUNTROWS('Sample')

 

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

this will work (unless nothing is selected)

 

 

Total Count = calculate(COUNTROWS('Sample'),all('Sample'))- COUNTROWS('Sample')

or simpler

Total Count = COUNTROWS(all('Sample'))- COUNTROWS('Sample')

 

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.