Forum Discussion
How to apply specific RLS to different visuals?
- Anonymous1 year ago
Hi Anonymous ,
I can't reproduce your mistake.
My measures are of the WHOLE NUMBER type.
There is another way to create two new measures:
CurUserMetric = CALCULATE ( SELECTEDVALUE ( 'Table'[Metric] ), FILTER ( 'Table', 'Table'[EMPL] = USERPRINCIPALNAME () ) )CurUserAndManagerMetric = CALCULATE ( SELECTEDVALUE ( 'Table'[Metric] ), FILTER ( 'Table', SELECTEDVALUE ( ( 'Table'[EMPL] ) ) = USERPRINCIPALNAME () || SELECTEDVALUE ( ( 'Table'[Manager] ) ) = USERPRINCIPALNAME () ) )Dragging these two measures to the two visual objects to replace the [Metric] also fulfills the requirement, and this method does not need to set the Filter.
If the problem is still not solved, please provide a Power BI Desktop file in progress (with sensitive information removed) that fully covers your issue or question in a usable format (not a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.
The pbix file is attached.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi Yang! Thank you for sharing this solution; it's promising. I was following the steps for Visual 1 & build Measure 1. When I try to filter to "is 1", the filter on the visual doesn't let me click on the drop down option:
I tried following this: Solved: Re: Using measure as a filter - Microsoft Fabric Community but it seemed like my DAX format was correct; did you also have it set to "Whole Number" as well?
Additionally, is there another way to do this instead of using MAX? When I was debugging, it seemed like the MAX returns the max of the dataset, so in this case, it'll only work if the employee == E. If the user viewing wasn't E, the boolean would be false since it's E [max employee in this dataset] == [another employee letter who's viewing].
Thank you very much again!
Hi Anonymous ,
I can't reproduce your mistake.
My measures are of the WHOLE NUMBER type.
There is another way to create two new measures:
CurUserMetric =
CALCULATE (
SELECTEDVALUE ( 'Table'[Metric] ),
FILTER ( 'Table', 'Table'[EMPL] = USERPRINCIPALNAME () )
)CurUserAndManagerMetric =
CALCULATE (
SELECTEDVALUE ( 'Table'[Metric] ),
FILTER (
'Table',
SELECTEDVALUE ( ( 'Table'[EMPL] ) ) = USERPRINCIPALNAME ()
|| SELECTEDVALUE ( ( 'Table'[Manager] ) ) = USERPRINCIPALNAME ()
)
)
Dragging these two measures to the two visual objects to replace the [Metric] also fulfills the requirement, and this method does not need to set the Filter.
If the problem is still not solved, please provide a Power BI Desktop file in progress (with sensitive information removed) that fully covers your issue or question in a usable format (not a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive (set up public access), SharePoint, or a Github repository, and then share the URL of the file.
The pbix file is attached.
If you have any other questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
- Anonymous1 year agoNot applicable
Hi Yang! Appreciate your help & alternatives here. Creating new DAX that's leveraging the FILTER() statement did work for our use case. Wishing the visual filter one did too, but this helps us continue in our build. Just marked your comment as the solution. 🙂