The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a Fact tablw which contain the sales data. And i got 2 dimension table. one for country and other for Sr manager names. Now i create a new table for access list. its is shown below.
I need to create the RLS based on the above list. As we can see that for Alex Sr Manager is showing as "All". IF "All" is coming then he should be able to see all the SR Manager name. Same in the case of Glen. For him both Country and SR Manager is coming as "All". So he should be able to see all the country and all SR manager. How can i achive this.
I tried something like this below. But when it is coming to "ALL" its coming as blank.
var _Restriction =
CALCULATETABLE(
VALUES( Access_List[Country] ),
Access_List[Email ] = USERPRINCIPALNAME()
)
var _RLS_Rest =
SWITCH(
TRUE(),
_Restriction = "ALL", TRUE(),
[Country] = _Restriction, TRUE(),
FALSE()
)
Return
_RLS_Rest
@unnijoy , I Usually Create a table with All , Name union with Name, Name and the join with table to get names when all use
All Guy
Guy Guy
Once UI gets the merged table, I have a column with the name, and you do not have to handle all
hi @amitchandak , i am not able to understand the solution that you gave. can we fix the below with out creating multiple tables.
var _Restriction =
CALCULATETABLE(
VALUES( Access_List[Country] ),
Access_List[Email ] = USERPRINCIPALNAME()
)
var _RLS_Rest =
SWITCH(
TRUE(),
_Restriction = "ALL", TRUE(),
[Country] = _Restriction, TRUE(),
FALSE()
)
Return
_RLS_Rest