Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
I have ~10,000 students who have the option of registering for 300 sessions. I would like to be able to use slicer 1 to select session numbers (examples: ME101, ME102, ME103) and generate a list of students who have taken those selected sessions. Slicer 2 would be used to select one session (not picked in slicer 1) and exclude the students who have attended that session from the list.
I'm having trouble creating the exclude slicer. I've tried a few options suggested in the forums, but can't seem to get it to work for my situation.
Solved! Go to Solution.
Hi @amaurey ,
Based on your description, I performed a new operation
Sample data
Create another table based on the original
Table 2 = 'Table'
Create two measures
Exclude Selection =
VAR selValTable = VALUES('Table'[Student name])
VAR selValTable1 = VALUES('Table 2'[Student name])
RETURN
IF(
ISFILTERED('Table'[Student name]),
COUNTROWS(
EXCEPT(selValTable1,selValTable)
),
COUNTROWS('Table 2')
)Filter = COUNTROWS('Table 2') - 'Table'[Exclude Selection]
Apply the filter to the visaul
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@amaurey , You need have two session tables, one connected Sessions and one disconnected SessionsInd
You need these measures
Included Students =
CALCULATE(
DISTINCTCOUNT(StudentsSessions[StudentID])
)
Excluded Students =
CALCULATE(
DISTINCTCOUNT(StudentsSessions[StudentID]),
ALL(Sessions),
Filter(StudentsSessions, NOT StudentsSessions[SessionID] IN VALUES(SessionsInd[SessionID])
))
Final Measure =
Countx(Values(StudentsSessions[StudentID]), if( isblank([Excluded Students]) && not(isblank([Included Students])) , [StudentID], blank()))
Final measure, you need to use in visual
Power BI Exclude selected Slicer value, Independent Table: https://youtu.be/lOEW-YUrAbE
Thank you for your reply. This is very similar to other solutions I've attempted (I've actually previously watched the same video before posting here) and I'm still stuck.
Can you clarify the following:
Thank you!
Hi @amaurey ,
Here some steps that I want to share, you can check them if they suitable for your requirement.
Here is my test data:
Create another table
Table 2 = 'Table'
Create a measure
Filter =
IF(
SELECTEDVALUE('Table 2'[Session Number]) IN VALUES('Table'[Session Number]),
0,
1
)
Apply the measure to the exclude slicer
The include slicer use the data from table and the exclude slicer use the datta from table 2
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Albert,
Thanks for you help, but it's not quite what I'm looking for. I need both slicers to filter the bottom table in different ways, and not the other slicers. My use case is I need to create a list of students who have taken a set of courses (ME102, ME103 for example) and then remove students from the list who have taken ME104.
Hi @amaurey ,
Based on your description, I performed a new operation
Sample data
Create another table based on the original
Table 2 = 'Table'
Create two measures
Exclude Selection =
VAR selValTable = VALUES('Table'[Student name])
VAR selValTable1 = VALUES('Table 2'[Student name])
RETURN
IF(
ISFILTERED('Table'[Student name]),
COUNTROWS(
EXCEPT(selValTable1,selValTable)
),
COUNTROWS('Table 2')
)Filter = COUNTROWS('Table 2') - 'Table'[Exclude Selection]
Apply the filter to the visaul
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
| User | Count |
|---|---|
| 23 | |
| 19 | |
| 18 | |
| 17 | |
| 11 |
| User | Count |
|---|---|
| 54 | |
| 53 | |
| 42 | |
| 38 | |
| 32 |