cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MBaldy Frequent Visitor
Frequent Visitor

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
Super User
Super User

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

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 Datanaut!"
MBaldy Frequent Visitor
Frequent Visitor

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

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.