Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PL-300 All Questions

View all questions & answers for the PL-300 exam

Exam PL-300 topic 2 question 67 discussion

Actual exam question from Microsoft's PL-300
Question #: 67
Topic #: 2
[All PL-300 Questions]

You have a Power BI data model that contains a table named Employees. The table has the following columns:

• Employee Name
• Email Address
• Start Date
• Job Title

You are implementing dynamic row-level security (RLS).

You need to create a table filter to meet the following requirements:

• Users must see only their own employee data.
• The DAX expression must work in both Power BI Desktop and the Power BI service.

Which expression should you use?

  • A. [Email Address] - USERNAME()
  • B. [Employee Name] - USERPRINCIPALNAME()
  • C. [Employee Name] = USERNAME()
  • D. [Email Address] = USERPRINCIPALNAME()
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
jessiejay
Highly Voted 1 year, 7 months ago
Selected Answer: D
Within Power BI Desktop, username() will return a user in the format of DOMAIN\User and userprincipalname() will return a user in the format of [email protected]. Within the Power BI service, username() and userprincipalname() will both return the user's User Principal Name (UPN). This looks similar to an email address.
upvoted 27 times
tiagoms
1 year, 5 months ago
https://learn.microsoft.com/en-us/power-bi/enterprise/service-admin-rls
upvoted 4 times
...
...
jiriz
Highly Voted 1 year, 8 months ago
Selected Answer: D
username() has the format of DOMAIN\username userprincipalname() always returns the user in the format of their user principal name, like [email protected] We want mail, so userprincipalname() is right
upvoted 9 times
...
jaume
Most Recent 6 days, 13 hours ago
Selected Answer: D
USERNAME() will work for PBI Service but not for PBI Desktop as it would return not UPN (User Principal Name" but DOMAIN\Username therefore we must use the solution using the USERPRINCIPALNAME() returning UPN in both cases
upvoted 1 times
...
rcaliandro
3 months, 1 week ago
Selected Answer: D
D - [Email Address] = USERPRINCIPALNAME() is the correct one because it always returns the email address
upvoted 1 times
...
Usm_9
8 months, 3 weeks ago
WAS ON THE EXAM 02 03 2024
upvoted 6 times
...
panic_attack
9 months ago
This was on the exam on 22/2/2024 (:
upvoted 5 times
...
ManuCorbe
9 months, 1 week ago
Easy, for manager role (Each manager must see only the data in the Sales and Human Resources tables for their own country) ROLE: Manager TABLE: Country DAX: [Email] = userprincipalname() Filtering the table COUNTRY for the USERNAME will only allow Manager role to see data in other tables filtered by her/his own country ROLE: CFO TABLE: Human Resources DAX: false() The CFO role will only have 1 restricted (false()) table that is Human resources. The rest is without filters
upvoted 1 times
...
Igetmyrole
1 year, 2 months ago
D is the correct answer.
upvoted 1 times
...
VGG2001
1 year, 4 months ago
Selected Answer: D
https://www.youtube.com/watch?v=TGgec9oP8oU this video explains it.
upvoted 5 times
...
HoneyBunny
1 year, 6 months ago
Selected Answer: A
To create dynamic row-level security (RLS) in Power BI that allows users to see only their own employee data, you can create a DAX expression using the USERNAME function. Here's the DAX expression you can use for the table filter: scss Copy code Employees[Email Address] = USERNAME() & "@contoso.com" Assuming that the domain for the email addresses is contoso.com, this expression filters the Employees table to show only the rows where the Email Address column matches the email address of the current user. The USERNAME() function returns the Windows account name of the current user in the format DOMAIN\Username. By concatenating the returned value with "@contoso.com", the DAX expression generates the email address of the current user that matches the email address in the Employees table. Note that to use this DAX expression, you need to configure row-level security in Power BI Desktop or the Power BI service. You can assign roles to users and apply filters based on the DAX expression for each role.
upvoted 1 times
applushka
10 months, 2 weeks ago
my understanding is that to make the provided expression work in both the desktop and PBI service you should use userprincipal(), username works on the desktop
upvoted 1 times
...
...
Shalaleh
1 year, 6 months ago
does anaybody have any source for this question?
upvoted 1 times
...
RazaTheLegend
1 year, 7 months ago
Selected Answer: D
To implement dynamic row-level security (RLS) on the Employees table, a table filter must be created. The table filter should be based on the user's email address or user principal name (UPN), as these are unique identifiers for each user. The DAX expression [Email Address] = USERPRINCIPALNAME() will filter the Employees table to only show rows where the Email Address column matches the UPN of the current user. This expression works in both Power BI Desktop and the Power BI service, and will ensure that each user only sees their own employee data.
upvoted 4 times
...
Lotusss
1 year, 7 months ago
But if we use the USERPRINCIPALNAME() function it returns the user's login name, which may not be the same as their email address. right?
upvoted 1 times
...
Shalaleh
1 year, 8 months ago
Does someone know why C is not correct?
upvoted 1 times
1sourabhpatel1
1 year, 7 months ago
Option C is incorrect because it checks for an exact match on the Employee Name column, which may not always be unique for each user.
upvoted 3 times
Jahanif
10 months, 2 weeks ago
Thanks for the explanation, appreciate it!
upvoted 1 times
...
...
...
Akhilesh_Maithani
1 year, 8 months ago
answer is right
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...