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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Prarav
Helper I
Helper I

Power BI - RLS

I need assistance with the following scenario:
 

I have a Power BI report. In my dataset I have two tables.

Table -1: REQ table

Columns: REQ No, URL(Web-url), PrimaryID(GUID), SecondaryID(GUID)

Table-2: USER table

Columns: userid(GUID), domainname(user’s email) email

  • REQ table doesn’t have POCemail.
  • The REQ table and USER table are linked through the UserID in the REQ table and the PrimaryID in the USER table.

I have a requirement where both Primary and Secondary users should be able to see all Request Numbers (REQ No). Additionally:

  • For Primary and Secondary users, the Request Numbers assigned to them should appear as hyperlinks.
  • For other users, all Request Numbers should be displayed as plain text (non-clickable).
5 REPLIES 5
Anonymous
Not applicable

Hi, @Prarav 

Firstly, I created the following sample data:

vlinyulumsft_0-1732083925398.png

vlinyulumsft_1-1732083925399.png

Secondly, assuming that the other users you mentioned refer to the USER[userid (GUID)] and REQ[PrimaryID (GUID)] not matching one-to-one, you should create the following measure:

 

Measure = 
VAR ww1=SELECTEDVALUE (USER[userid (GUID)])
VAR ID1 =
    CALCULATETABLE (
        VALUES ( 'REQ'[REQ No]),
        FILTER ( ALLSELECTED ( 'REQ' ), 'REQ'[PrimaryID (GUID)]= ww1 )
    )
RETURN
   IF(MAX('REQ'[REQ No]) IN ID1,MAX('REQ'[URL]),BLANK())

 

Then, apply this measure to the 'REQ'[REQ No] column:

vlinyulumsft_2-1732083970885.png

vlinyulumsft_3-1732083970886.png

 

Finally, make the modifications in the location indicated in the diagram below:

vlinyulumsft_4-1732083990851.png

Here are the final results:

vlinyulumsft_5-1732083990853.png

 

Due to privacy agreements, we are unable to provide a test email directly; I recommend using your own Power BI user email for testing purposes.

 

For further details, please refer to:

https://learn.microsoft.com/en-us/fabric/security/service-admin-row-level-security#using-the-usernam...


 

When uploading a file, please be careful to delete sensitive information.


Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

For questions about uploading data, you can try the following links:

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Solved: How to upload PBI in Community - Microsoft Fabric Community

 

Best Regards,

Leroy Lu

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

 I followed your steps and tried but still not working. It is showing blank report for non POC users.

Thank you. 

Anonymous
Not applicable

HI, @Prarav 
Thank you for your prompt response.

 

Could you please provide details on what your expected output should look like? I suspect there may be a misunderstanding on my part regarding your question, and I would appreciate it if you could clarify the following:

 

1.What are the results from the perspectives of Primary and Secondary users compared to those of other users?

2.How do we determine which users fall under the category of 'other users'? Am I correct in understanding that this refers to users who have a UserID but do not have a PrimaryID?

 

I hope you can answer my questions, as this will help me better understand your issue and propose a more suitable solution for you.

 

For questions about uploading data, you can try the following links:

How to provide sample data in the Power BI Forum - Microsoft Fabric Community

Solved: How to upload PBI in Community - Microsoft Fabric Community

 

When uploading a file, please be careful to delete sensitive information.

 

Best Regards,

Leroy Lu

Hi Lu,

I appreaciate your help. Please see my answers below in blue text

 

1.What are the results from the perspectives of Primary and Secondary users compared to those of other users?

 

Primary and Secondary users should be able to see all Request Numbers as plain text. However, the Request Numbers that belong to them should appear as hyperlinks.

Something like:

1. Scenario

Prarav_0-1732305150527.png

OR

2. Scenario. I would like to display something like following screenshot.

Prarav_1-1732305562430.png

 

 

 

2.How do we determine which users fall under the category of 'other users'? Am I correct in understanding that this refers to users who have a UserID but do not have a PrimaryID?

 

Users who are not assigned as Primary POCs or Secondary POCs should see the Request Numbers as plain text when they open the report.

Anonymous
Not applicable

Hi, @Prarav 

Thank you for your prompt response.

Based on your latest reply, I have updated my solution as follows:

 

1.Firstly, I have created the following measures:

Measure = 
VAR ccc1=CALCULATETABLE (
        VALUES ( 'USER'[domainname (email)]),
        FILTER ( ALLSELECTED ( 'USER' ), 'USER'[userid (GUID)] IN VALUES('REQ'[PrimaryID (GUID)]) )
    )
VAR No1 =
    CALCULATETABLE (
        VALUES ( 'REQ'[REQ No]),
        FILTER ( ALLSELECTED ( 'REQ' ), 'REQ'[PrimaryID (GUID)] IN VALUES(USER[userid (GUID)]) )
    )
RETURN
   IF(USERPRINCIPALNAME() IN ccc1,IF(MAX('REQ'[REQ No]) IN No1,MAX('REQ'[URL]),BLANK()),BLANK())

2.Secondly, I have modified the settings in the visualization:

vlinyulumsft_0-1732528128397.png

vlinyulumsft_1-1732528128398.png

3.Here are the final results:

 

When the user is a Primary and Secondary user:

vlinyulumsft_2-1732528142097.png

 

When the user is another type of user:

vlinyulumsft_3-1732528142098.png

Please note that the USERPRINCIPALNAME() function returns the email address you are currently using.
 

Please find the attached pbix relevant to the case.

 
 

Best Regards,

Leroy Lu

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.