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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
tegar
Frequent Visitor

Error RLS Dax Direct Query in Report Server

Hi,

 

I try to implement RLS in Direct Query Report Server, with this dax:

var vProfileRole = CALCULATETABLE (VALUES ( DIM_REL_OWNER[ROLE] ),
DIM_REL_OWNER[NPK]&"@company.com"=UserPrincipalName()
)

 

var vProfileBM = CALCULATETABLE (VALUES ( DIM_REL_OWNER[BRANCH_CD] ),
DIM_RELATIONSHIP_OWNER[NPK]&"@company.com"=UserPrincipalName(), DIM_REL_OWNER[ROLE]="BM"
)

 

var vProfileHOA = CALCULATETABLE (VALUES ( DIM_REL_OWNER[BRANCH_CD] ),
DIM_REL_OWNER[NPK]&"@company.com"=UserPrincipalName(), DIM_REL_OWNER[ROLE]="HOA"
)

 

return

Switch(
TRUE(),
vProfileRole = "BM", [BRANCH_CD] = vProfileBM),
vProfileRole = "HOA", [AREA_CD] = vProfileBM, FALSE()
)

 

But that dax give me error like this : function "PLACEHOLDER" is not allowed as part of row level security expression on Direct Query models.

 

Any idea for fixing the error?

 

Thanks

Tegar

2 REPLIES 2
tegar
Frequent Visitor

hi @v-easonf-msft 

 

the error still arise, i'm sorry that typo in this thread. in the actual file theres no parentheses

I've found some solution with change the variable dax like this: 

var vProfileBM = SELECTCOLUMNS(FILTER(DIM_REL_OWNER, DIM_REL_OWNER[NPK]&@company.com"=UserPrincipalName() && DIM_REL_OWNER[ROLE]="BM"), "Branch", DIM_REL_OWNER[BRANCH_CD])

 

But it give me bad performance, that take lot of time for every action in dashboard.

 

Any other dax way for the best performance with short load time?

v-easonf-msft
Community Support
Community Support

Hi, @tegar 

Please look at the highlighted part in my screenshot, there seems to be extra parentheses in the formula. Please delete and test again.

veasonfmsft_0-1652668067550.png

Best Regards,
Community Support Team _ Eason

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.