The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I am curious for assistance with what the correct function would be to resolve the following DAX statement to configure RLS:
The goal is to have a primary & secondary users (ie Salesforce Account Household Import) both have access to the same RLS-enforced data. An example outcome would be Primary Household User associated data (Enforced by Email address field connected to User Prinicpal Name) is accessible by the secondary household user (via accountID).
[Email Address]=
VAR CurrentUserEmail = UserPrincipalName()
VAR CurrentUserAccount = SELECTEDVALUE('Custom Table'[Custom Table_Contact__c])
RETURN
IF(
CONTAINSROW(
FILTER(
ALL('Contact'),
'Contact'[AccountId] = CurrentUserAccount
),
'Contact'[workemail__c] = CurrentUserEmail
),
CurrentUserEmail,
BLANK()
)
@flyzone Maybe containsrows is not the right approach, and that's why I asked if you share sample data it will help to provide the appropriate solution.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@flyzone not fully sure what you are looking for. It will be easier if you post some data with the expected result. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I am looking more for the appropiate syntax or function surrounding the CONTAINSROW line. I want to filter the data by connecting the current user email to the respective work email field which concurrently will match the current user account to all work emails within the specfic user accountid. Essentially two users share an accountid which both need RLS access to the same dataset.