Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
dbollini
Helper II
Helper II

DAX expression issue for Dynamic Row level Security

 

 

 

I am trying to solve the issue for complicated DRLS for multiple tables .

When user logs in i have to get employee id based on there login adid and use that to search for the protocols they have access to based on the employee id or employee no in the Viewcorezcodereport and display only those protocol information in teh power Bi report.

 

How do i solve the complicated Dax expression required

 

1 ACCEPTED SOLUTION

@dbollini , You can create measures like

 

measure =

var _tab = summarize(filter(allselected(ADUser), [email] =userprincipalname()) , ADuser[EmployeeID])

return

calculate(countrows(Viewcorezcodereport), filter(Viewcorezcodereport , Viewcorezcodereport [EmployeeID] in _tab))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@dbollini , if you create a role using you ad user tbale with filter

 

[email] = userprincipalname()

 

Then it should filter both tables for that . Make sure you check flag security filter in both directions

 

How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you but it ddid not work as based on there login i have to get there employeeid or employeeno then get the records matching from the Viewcorezcodereport table

@dbollini , You can create measures like

 

measure =

var _tab = summarize(filter(allselected(ADUser), [email] =userprincipalname()) , ADuser[EmployeeID])

return

calculate(countrows(Viewcorezcodereport), filter(Viewcorezcodereport , Viewcorezcodereport [EmployeeID] in _tab))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

It is getting the employeeid and i added in the ADusers (manage roles area) but when i tried the second expression last line in _tab)) or Var_tab it is throwing error in the other table manage roles area.

Thank you i am getting the ID with the first measure but second measure does not like the last one in_tab to use it as it says error and how am i supposed to use the measures to filter the data in the power Bi report

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.