Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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
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?
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.
Best Regards,
Community Support Team _ Eason
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |