Forum Discussion
Filter chart by selected user's group
- Anonymous5 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 )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
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 )
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
- RobbLewz5 years agoHelper II
Thanks for the reply.
Your method sounds like it will work, I found a very similar way in the end. I duplicated the employee table (which also has the group id in it) for the slicer. I joined the duplicated employee table to the "normal" employee table using a distinct list of group Id's as a bridging table.If you use the "normal" employee table to provide the employee name as the chart axis then there is no need for a filter as that comes from the bridging table between the normal and duplicate table.
It's shocking sometimes how over complicatied everyting must be in power BI to achieve such simple things.