cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jimen
Regular Visitor

DAX on RLS

Hi all, I wanted to make relationship between the security table and the fact table without having the connection in the modelling part. FacSecAccess is the security table. So I'm planning to do RLS role that can filter which email (in table FacSecAccess) that can access particular permission/department in FacPrmsn table that connected to the Data table without having the connection between the FacSecAccess and FacPrmsn. Any idea on how to do this? 

 

Data and FacPrmsn connection key = DEPT_C

 

FacPrmsn and FacSecAccess connection key = Prmsn/PRMSN

Capture.PNG

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @jimen ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

vpollymsft_0-1648181320016.png

 

Create a measure in table FacPrmsn.

Measure = (LOOKUPVALUE(FacSecAccess[e-mail],FacSecAccess[PRMSN],MAX(FacPrmsn[PRMSN])))

Then create a measure in table FacSecAccess.

Measure 2 = FacPrmsn[Measure]

Then create roles.

vpollymsft_1-1648181456836.png

Then view as the role.

vpollymsft_2-1648181488221.png

If I have misunderstood your meaning, please provide you pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-rongtiep-msft
Community Support
Community Support

Hi @jimen ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

vpollymsft_0-1648181320016.png

 

Create a measure in table FacPrmsn.

Measure = (LOOKUPVALUE(FacSecAccess[e-mail],FacSecAccess[PRMSN],MAX(FacPrmsn[PRMSN])))

Then create a measure in table FacSecAccess.

Measure 2 = FacPrmsn[Measure]

Then create roles.

vpollymsft_1-1648181456836.png

Then view as the role.

vpollymsft_2-1648181488221.png

If I have misunderstood your meaning, please provide you pbix file without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors