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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
SAIKIRANCHAVALI
Frequent Visitor

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors