Forum Discussion

RobbLewz's avatar
RobbLewz
Helper II
5 years ago
Solved

Filter chart by selected user's group

I have an individual employee report page I am putting together.   The majority of the information on the page will be for the choosen employee.  However, I have a bar chart that I want to show eve...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi RobbLewz ,

     

    According to my understand, you want to display all other users in the same group as the selected user, right?

     

    Please follow these steps:

    1. Create a new table with Name columns for slicer like this:

    2. Build relationships based on IDs.

    3. Create a measure using the following formula and apply it to filter pane:

    Measure =
    VAR _group =
        CALCULATE (
            MAX ( 'DimEmployee'[Group] ),
            FILTER (
                ALL ( 'DimEmployee' ),
                'DimEmployee'[Name] = SELECTEDVALUE ( ForSlicer[Name] )
            )
        )
    RETURN
        IF ( MAX ( 'DimEmployee'[Group] ) = _group, 1, 0 )

     

    Here is the pbix file.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    Best Regards,
    Eyelyn Qin