We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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 |
|---|---|
| 53 | |
| 38 | |
| 33 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 67 | |
| 62 | |
| 38 | |
| 34 | |
| 22 |