cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
billjn
Advocate I
Advocate I

PATH function always results in multiple values error

I've been trying to use the DAX PATH function as I have a project where I'll need to know the organization hierarchy for security purposes.  Every time I use the PATH function I receive this error:  

MdxScript(Model) (4, 48) Calculation error in measure 'AD Users with Managers'[Pathtest]: A table of multiple values was supplied where a single value was expected.

(The numeric values change depending on my dataset).

 

I've tried with my data pulled directly from AD with employee and manager IDs, with a dataset from RADCAD created specficialy to demonstrate how to use PATH, and by creating a table in Power BI using the data shown in the Microsoft Docs page about understanding parent/child functions in DAX: https://docs.microsoft.com/en-us/dax/understanding-functions-for-parent-child-hierarchies-in-dax

 

In all cases, I've made sure the child and parent ID fields are either integer or text, and that both have the same datatype.  I've also made sure that the child ID does NOT have any duplicates.  The parent ID does have duplicates, because a manager can have more than one employee.

 

Here is how I've written my PATH measure - 

Pathtest = path('AD Users with Managers'[PrincipalId],'AD Users with Managers'[MgrPrincipalId])
 
I'm running Win 10 with Power BI Desktop Version: 2.80.5803.1061 64-bit (April 2020)
 
Anyone have any ideas?
 
Thanks!
 

 

1 ACCEPTED SOLUTION
yingyinr
Community Support
Community Support

Hi @billjn ,

Please create a calculated column instead of measure with same formula just like below screen shot, it works well.

path issue.JPG

In addition, you can review the documentation for more details.

Parent and Child Functions -Hierarchies

https://dax.guide/path/

Parent-Child Hierarchies

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
yingyinr
Community Support
Community Support

Hi @billjn ,

Please create a calculated column instead of measure with same formula just like below screen shot, it works well.

path issue.JPG

In addition, you can review the documentation for more details.

Parent and Child Functions -Hierarchies

https://dax.guide/path/

Parent-Child Hierarchies

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thank you SO much!  That did it - creating a column rather than a measure!!!

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors