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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Setting up row level security with lookupvalue

Hi all, I'm relatively new to DAX expressions and my head is spinning a little bit so hopefully I can get some clarity here.

 

Say I have two tables:

Table_1

GradeYearMonthSchoolID
   11111
   33333
   22222
   44444

 

Table_2

EmailIdentityIDSchoolID
test@gmail.com1011111
test@hotmail.com1022222

 

 

My report consists only of data in table_1. When logging in to access the report, a user may log in with their gmail or hotmail account and will access the same data, rows from Table_1 where SchoolID IN (11111,22222).

 

In Power BI, I'm trying to create a DAX expression that will get the identity ID from the UserPrincipalName, get all SchoolIDs that match that IdentityIDs, and show all rows from Table_1 that have SchoolID in that list of SchoolIDs. 

 

I tried playing around with LOOKUPVALUE but since that only returns a single value, I'm not sure if that's the right track.

1 REPLY 1
lbendlin
Super User
Super User

You can use TREATAS to bridge the air gap between tables if they have equivalent sets of columns.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors