Have you checked the following article? You can add member to the role by typing in the email address, or name of the user, security group or distribution list you want to add. This operation can only be taken in Power BI Service rather than in Power BI Desktop.
In addition, you can specify a value which doesn’t exist in your dataset when creating DAX expression for the role. After that , test the results of the role within Power BI Desktop and you will find that you hide the entire report for this role. There is an example for your reference.
However, if the above solution is not helpful, please describe more details about your requirement.
Thanks, Lydia Zhang
Community Support Team _ Lydia Zhang If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.