Forum Discussion
Expanding filter scope from slicer selected value
- Anonymous2 years ago
Hi bruzie ,
Because of the relative complexity of your report, I can't make changes directly in your report, so I can only provide you with an example in Page2 of the pbix file you provided.
I add a new table like this:And there is no relationship between this table and other tables:
Then I create a measure:
Measure = VAR A = SELECTEDVALUE(Slicer[UserName]) VAR B = CALCULATE( MAX('Users'[Group]), FILTER(ALL(Users), 'Users'[UserName] = A ) ) RETURN IF( ISFILTERED(Slicer[UserName]), IF( MAX('Users'[Group]) = B, 1, 0 ), 1 )Make the settings according to the following figure:
And use the table which I added before to create a slicer, and the final output is as below:
When I select Mike, it shows Mike and everyone in Mike's group.
You can use this as a reference to try to modify the visual objects you need to create.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi bruzie ,
Because of the relative complexity of your report, I can't make changes directly in your report, so I can only provide you with an example in Page2 of the pbix file you provided.
I add a new table like this:
And there is no relationship between this table and other tables:
Then I create a measure:
Measure =
VAR A = SELECTEDVALUE(Slicer[UserName])
VAR B =
CALCULATE(
MAX('Users'[Group]),
FILTER(ALL(Users),
'Users'[UserName] = A
)
)
RETURN
IF(
ISFILTERED(Slicer[UserName]),
IF(
MAX('Users'[Group]) = B,
1,
0
),
1
)
Make the settings according to the following figure:
And use the table which I added before to create a slicer, and the final output is as below:
When I select Mike, it shows Mike and everyone in Mike's group.
You can use this as a reference to try to modify the visual objects you need to create.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
As a follow-up, I massively over-complicated the scenario. It turns out I could achieve the same thing by simply joining the Users table with the GroupCompletions summary table by the Group fields with a one-way filter, which means this will work with RLS as well.