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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
nishthabhakta20
Frequent Visitor

Row Level Security Issue

RLS in Power BI Causing Blank Data – Need Help Debugging

Issue Summary

Applying Row-Level Security (RLS) in Power BI causes all data to go blank when testing with "View As Role" in Power BI Desktop. Relationships seem correct, but the Fact Table is not returning records.

 

Data Model Setup

  1. Roles_Email (User-Contractor Mapping for RLS)
  • User Email: User IDs
  • Contractor Name: Assigned Contractors
  • Role: Page-level security
  1. Bridge_Contractor (Filters Fact Table)

Bridge_Contractor =

FILTER(

    DISTINCT (

        UNION (

            SELECTCOLUMNS(Roles_Email, "Contractor Name", [Contractor Name]),

            SELECTCOLUMNS(Fact_Table, "Contractor Name", [Contractor A]),

            SELECTCOLUMNS(Fact_Table, "Contractor Name", [Contractor B])

        )

    ),

    NOT(ISBLANK([Contractor Name]))

)

  1. Fact Table (Business Data)
  • Contractor A / Contractor B
  • Other fields like Project ID, Revenue
  1. Page_Roles (Page Security)
  • Role: Defines accessible pages

 

Relationships

Table A

Table B

Column Name

Relationship Type

Cross-Filter

Roles_Email

Bridge_Contractor

Contractor Name

One-to-Many

Both

Fact Table

Bridge_Contractor

Contractor Name

Many-to-One

Both

Roles_Email

Page_Roles

Role

One-to-Many

Both

 

RLS Applied on Roles_Email

[User Email] = USERPRINCIPALNAME()

Expected Behavior:

  • Users only see assigned contractors
  • Fact Table filters records where Contractor A or Contractor B match the assigned contractors

Actual Behavior:

  • All data disappears when testing "View As Role"

Debugging Done

Relationships checked – "Both" cross-filtering enabled
Bridge_Contractor verified – Contains correct contractor names
RLS removed from Fact Table & Bridge_Contractor – No fix
Manual filtering works – But RLS still blanks Fact Table
Tried modified RLS:

[User Email] = USERPRINCIPALNAME() && NOT(ISBLANK([Contractor Name]))

Still not working

Need Help With:

  • Why is RLS blanking out Fact Table?
  • How to ensure Roles_Email filters Fact Table correctly?
  • Alternative ways to apply RLS?

Would appreciate any suggestions.

 

2 REPLIES 2
nishthabhakta20
Frequent Visitor

@Sahir_Maharaj Sure I can try that. What should I be placing RLS on? On Role_Emails Page? OR Contractor Bridge page?

Sahir_Maharaj
Super User
Super User

Hello @nishthabhakta20,

 

Can you please try the following approach:

Bridge_Contractor =
VAR ContractorsFromRoles =
    DISTINCT (SELECTCOLUMNS(Roles_Email, "Contractor Name", [Contractor Name]))

VAR ContractorsFromFact =
    DISTINCT (
        UNION (
            SELECTCOLUMNS(Fact_Table, "Contractor Name", [Contractor A]),
            SELECTCOLUMNS(Fact_Table, "Contractor Name", [Contractor B])
        )
    )

RETURN 
    FILTER (
        UNION (ContractorsFromRoles, ContractorsFromFact),
        NOT(ISBLANK([Contractor Name]))
    )

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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