Forum Discussion
CLede1210
1 year agoRegular Visitor
Switch RLS on and off within the same semantic model
Hello, We have the need to leverage multiple different RLS rules while using the same data. This has cuased us to create very similar datasets with the only difference being how RLS is applied on...
alessiomissio
1 year agoFrequent Visitor
I had a similar requirement long time ago.
Different people need to see different pages.
Since we didn't want to hide pages and playing with bookmarks, we setup an externa EXCEL file adding people and subjects.
All the measures in the Datamodel would have a SecurityCheck Measure inside, that checks if USERPRINCIPALNAME() is in the list, if not the Measure returns 0 or N/A.
SECURITY_MULTIPLIER = IF(calculate(COUNTROWS(USER_EMAIL), FILTER(USER_EMAIL, USER_EMAIL[EMAIL]=UPPER(USERPRINCIPALNAME())))>=1, 1, 0)
AMOUNT_SALES = CALCULATE(SUM(ORDERS[Amount]))*[SECURITY_MULTIPLIER]