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

Dynamic row level security based on username stored in multiple locations in the DB

I have a requirement to use dynamic row level security to show transactions owned or introduced by a paticular user, to explain the further, on the transaction database table we have have twi userid columns Introducer and SalesPerson, each joined to a unique table - DimIntroducer and DimSalesperson. A given user could be one of these or both.

 

We need to give the user access to the row of data if he is in either of the fields, so it like we have to use an OR somewhere, as it will need to return the data if his username matches either column or both.

 

I've had a good search of web resources and haven't really come up with any examples of this, I've come up with the following so far  

 

=facttransactions[TraID]=LOOKUPVALUE(DimIntroducer[EMAIL],USERNAME(), DIMSalesPerson[EMAIL],USERNAME())

 

But I would expect this to only return data where a single user is in both fields.

 

Any suggestions would be helpful,

 

Thanks alot,

 

Matt

 

 

2 REPLIES 2
GilbertQ
Super User
Super User

Hi there,

Just to confirm it that the data is being imported into the Power BI PBIX?




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Anonymous
Not applicable

Ahhh, yes , but it's an SSAS data source. Could be the Dax statement will fo into SSAS role but the principles will be the same I should think.

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
Top Kudoed Authors