0
0
Power BIbi_tool~10 mins

Managing RLS in Service in Power BI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define a role filter in Power BI Desktop.

Power BI
FILTER('Sales', 'Sales'[Region] = [1])
Drag options to blanks, or click blank then click option'
A'North'
BNorth
C"North"
DRegion
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around text values.
Using double quotes instead of single quotes for strings.
2fill in blank
medium

Complete the DAX expression to create a dynamic RLS filter based on the USERNAME function.

Power BI
FILTER('Employees', 'Employees'[Email] = [1]())
Drag options to blanks, or click blank then click option'
AUSERNAME
BUSERPRINCIPALNAME
CUSEREMAIL
DUSERID
Attempts:
3 left
💡 Hint
Common Mistakes
Using USERNAME() which returns a different format.
Using non-existent functions like USEREMAIL().
3fill in blank
hard

Fix the error in the DAX expression for RLS that filters sales by region.

Power BI
FILTER('Sales', 'Sales'[Region] [1] "West")
Drag options to blanks, or click blank then click option'
A!=
B==
C=
D===
Attempts:
3 left
💡 Hint
Common Mistakes
Using '==' or '===' which cause syntax errors.
Using '!=' when equality is needed.
4fill in blank
hard

Fill both blanks to create a role filter that allows access only if the user's department matches the data.

Power BI
FILTER('Employees', 'Employees'[Department] [1] USERPRINCIPALNAME() [2] 'Employees'[Email])
Drag options to blanks, or click blank then click option'
A=
B&&
D||
Attempts:
3 left
💡 Hint
Common Mistakes
Using || instead of && which changes logic.
Using == instead of = for comparison.
5fill in blank
hard

Fill all three blanks to create a DAX expression that filters sales data for the current user and only for the current year.

Power BI
FILTER('Sales', 'Sales'[SalespersonEmail] = [1]() [2] YEAR('Sales'[Date]) [3] YEAR(TODAY()))
Drag options to blanks, or click blank then click option'
AUSERPRINCIPALNAME
B&&
C=
D||
Attempts:
3 left
💡 Hint
Common Mistakes
Using USERNAME() instead of USERPRINCIPALNAME().
Using || instead of && which changes logic.
Using == instead of = for equality.