Forum Discussion

amaurey's avatar
amaurey
Regular Visitor
2 years ago
Solved

Using Include and Exclude Slicers to Generate List

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 s...
  • Anonymous's avatar
    Anonymous
    2 years ago

    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