Complete the DAX expression to get the current user's username.
CurrentUser = [1]()The USERNAME() function returns the current user's username in Power BI, which is essential for dynamic row-level security.
Complete the FILTER expression to restrict data to rows where the 'Salesperson' column matches the current user.
FILTER(Sales, Sales[Salesperson] = [1]())The USERNAME() function returns the current user's username, which you compare to the 'Salesperson' column to filter rows dynamically.
Fix the error in the DAX expression to correctly filter rows for dynamic RLS.
FILTER(Employees, Employees[Username] = [1])The function USERNAME() must include parentheses to be called correctly in DAX.
Fill both blanks to create a DAX filter that allows access only if the current user matches the 'UserEmail' column.
FILTER(Users, Users[UserEmail] = [1]() && [2](Users[UserEmail], 12) = "@company.com")
USERPRINCIPALNAME() returns the user's email, and RIGHT extracts the domain part to check if it matches '@company.com'.
Fill all three blanks to create a DAX expression that filters the 'Sales' table for rows where the 'Region' matches the user's region stored in a 'UserRegion' table.
FILTER(Sales, Sales[Region] = RELATED([1][[2]]) && RELATED([1][Email]) = [3]())
RELATED(UserRegion[RegionName]) gets the user's region, and USERPRINCIPALNAME() returns the user's email to match the current user.