Forum Discussion
Using Include and Exclude Slicers to Generate List
- Anonymous2 years ago
Hi amaurey ,
Based on your description, I performed a new operation
Sample dataCreate 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:
- For the slicers, should they be using fields from the same data table or should one slicer be using a field from the disconnected table?
- Where do I place the Included Students and Excluded Student measures?
- The Final Measure is not a filter, but should be used as a column in the final table?
Thank you!