Complete the code to define a role filter in Power BI Desktop.
FILTER('Sales', 'Sales'[Region] = [1])
In Power BI DAX, text values must be enclosed in single quotes inside the FILTER function.
Complete the DAX expression to create a dynamic RLS filter based on the USERNAME function.
FILTER('Employees', 'Employees'[Email] = [1]())
USERPRINCIPALNAME() returns the logged-in user's email or login name, commonly used for dynamic RLS.
Fix the error in the DAX expression for RLS that filters sales by region.
FILTER('Sales', 'Sales'[Region] [1] "West")
In DAX, the equality operator is a single equals sign (=), not double or triple equals.
Fill both blanks to create a role filter that allows access only if the user's department matches the data.
FILTER('Employees', 'Employees'[Department] [1] USERPRINCIPALNAME() [2] 'Employees'[Email])
The filter uses equality (=) to compare department and email, combined with a logical AND (&&) to combine conditions.
Fill all three blanks to create a DAX expression that filters sales data for the current user and only for the current year.
FILTER('Sales', 'Sales'[SalespersonEmail] = [1]() [2] YEAR('Sales'[Date]) [3] YEAR(TODAY()))
This expression filters sales where the salesperson email matches the logged-in user and the sale year equals the current year, combining conditions with AND (&&) and using = for equality.