Forum Discussion
RLS Dax - IF Don't RLS
- 4 years ago
Figured it out, it would just be "TRUE()", however that code does not work. Instead I had to create a summary table (Table 2 in the code below) of User ID and a count of Campaigns assigned to them, and then evaluate that table in the RLS DAX.
VAR Calc =
CALCULATETABLE (
SUMMARIZE ( 'Table 2', [CampCount] ),
'Table 2'[UserId] = USERNAME ()
)
RETURN
IF ( SUMX ( Calc, [CampCount] ) > 0, [UserID] = USERNAME (), TRUE () )
Figured it out, it would just be "TRUE()", however that code does not work. Instead I had to create a summary table (Table 2 in the code below) of User ID and a count of Campaigns assigned to them, and then evaluate that table in the RLS DAX.
VAR Calc =
CALCULATETABLE (
SUMMARIZE ( 'Table 2', [CampCount] ),
'Table 2'[UserId] = USERNAME ()
)
RETURN
IF ( SUMX ( Calc, [CampCount] ) > 0, [UserID] = USERNAME (), TRUE () )