The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have a table/matrix visual where there are multiple columns some of which are measure based.
We have a scenario wherein for some set of users, we want to blank out some measure based columns and for others all columns shoukd be visible.
So how to handle this scenario?
I didnt find any way to identify in which role the logged in user maps to for me to sort this out
Solved! Go to Solution.
You can have a Security table created within the PBIX and have roles associated to that fileterd values in security table.
Post that you can compare whether that role exists within that table or not.
Attaching a sample file
Hi @Rohitb ,
You can refer this -
https://tenfingerseddy.wordpress.com/2023/05/15/masking-data-in-power-bi/
I hope it will be helpful.
Thanks,
Sai Teja
You can have a Security table created within the PBIX and have roles associated to that fileterd values in security table.
Post that you can compare whether that role exists within that table or not.
Attaching a sample file
@Rohitb , You can use Row level security for this and create two roles and append measure like this
ConditionalSalesAmount =
IF (
USERPRINCIPALNAME() IN VALUES(Users[Email]),
IF (
MAX(Users[UserRole]) = "Restricted",
BLANK(),
[SalesAmount]
),
[SalesAmount]
)
here are some additional videos on RLS- https://youtu.be/42MK5XOa9gc?si=Mow33f6CSIEbzf7Z
And Microsoft Documentation - https://tinyurl.com/ys7vx986
Proud to be a Super User! |
|
Hello @bhanu_gautam
Thankyou for your response.
The RLS is security group based, so we won't be able to know all the users who will have access.
Can you help/modify your solution with this information ?