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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam PL-300 topic 2 question 60 discussion

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

You have a Power BI model that contains a table named Employee. The table contains the following data.



Each employee has one manager as shown in the ParentEmployeeID column.

All reporting paths lead to the CEO at the top of the organizational hierarchy.

You need to create a calculated column that returns the count of levels from each employee to the CEO.

Which DAX expression should you use?

  • A. PATHLENGTH(PATH(Employee[EmployeeID],Employee[ParentEmployeeID]))
  • B. PATHITEM(PATH(Employee[EmployeeID],Employee[ParentEmployeeID]),1,INTEGER)
  • C. PATHCONTAINS(PATH(Employee[EmployeeID],Employee[ParentEmployeeID]),1)
  • D. PATH(Employee[EmployeeID],Employee[ParentEmployeeID])
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
svg10gh
Highly Voted 1 year, 3 months ago
A is correct answer. This video proves all https://www.youtube.com/watch?v=uE0G6gLz7WM
upvoted 24 times
JudT
1 month ago
Great link. Ta
upvoted 1 times
...
Nass75
1 year ago
Thanks for the video link.
upvoted 2 times
...
IVO999
8 months, 3 weeks ago
Thanks!
upvoted 1 times
...
hativo5113
7 months, 3 weeks ago
what a great video man.
upvoted 2 times
...
...
ewelaela
Highly Voted 1 year, 3 months ago
Selected Answer: A
Answer A is correct - tested Although for CEO it returns 1 - so I personally would substract 1 from this PATHLENGTH when creating the report, as I think numbers of levels from CEO to CEO is 0, formanagaers directly under CEO it is 1 etc
upvoted 24 times
gaikwpa
9 months, 3 weeks ago
PATH will give this - ToTop 100 100|101 100|102 100|101|103 100|101|103|104 100|101|103|105 100|102|106 PATHLENGTH(PATH...) will give this 1 2 2 3 4 4 3
upvoted 13 times
...
...
applushka
Most Recent 3 months, 2 weeks ago
Selected Answer: A
tested in PBI, PATHLENGTH(PATH(Employee[EmployeeID],Employee[ParentEmployeeID])) will return the count of levels including 1 for the CEO itself as ewelaela mentioned earlier
upvoted 1 times
applushka
3 months, 2 weeks ago
PATHLENGTH return 1 for top level
upvoted 1 times
...
...
Igetmyrole
7 months, 3 weeks ago
A is correct answer. This expression calculates the path length from each employee to the CEO, effectively giving you the count of levels in the hierarchy.
upvoted 1 times
...
ngoduytien
11 months, 2 weeks ago
A https://learn.microsoft.com/en-us/dax/pathlength-function-dax
upvoted 2 times
...
RazaTheLegend
1 year ago
Selected Answer: A
Answer A is correct - tested Although for CEO it returns 1 - so I personally would substract 1 from this PATHLENGTH when creating the report, as I think numbers of levels from CEO to CEO is 0, formanagaers directly under CEO it is 1 etc
upvoted 1 times
og44
5 months ago
these types of conventions kill me. for example python and nmpy will start their indexes from 0, but pandas will use 1.
upvoted 1 times
...
...
glenman0202
1 year, 2 months ago
Selected Answer: A
According to https://learn.microsoft.com/en-us/dax/path-function-dax, PATH returns a string containing "the identifiers of all the parents to the current identifier", whereas PATHLENGTH returns "the number of items that are parents to the specified item."
upvoted 7 times
...
HemantGorle
1 year, 3 months ago
Selected Answer: A
PathLength function needs a path to travel and provide length of the hierarchy
upvoted 1 times
...
Nuli
1 year, 3 months ago
The Answer is A because the question instructs that we count the different levels of each employee. The PathLength gives the result. For more information see the link https://learn.microsoft.com/en-us/dax/pathlength-function-dax Answer D is wrong because it only returns the items related to the current row value and does not give the count.
upvoted 2 times
...
Sushvij
1 year, 3 months ago
A is correct answer
upvoted 3 times
...
Danylessoucis
1 year, 3 months ago
Correct answer
upvoted 2 times
...
GuerreiroJunior
1 year, 3 months ago
Selected Answer: D
https://simplebiinsights.com/power-bi-path-function-for-parent-child-hierarchies-in-dax/#:~:text=PATH%20function%20returns%20a%20delimited,to%20the%20current%20row%20value.
upvoted 2 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 ...