cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
brianalva
Helper I
Helper I

Path Function with multiple classification/grouping

Hi,

 

I am currently working on Org Structure data with Parent-Child heirarchy. My data consists of multiple companies and I want to build Path functions on it. example PATH, PATHITEM etc

 

Sample

Company_id   Employee_id   Supervisor_id

a                      1                                         

a                      2                       1

a                      3                       1

a                      4                       2

b                      1

b                      2                       1

b                      3                       1

 

Bu thtese functions need unique identifier. Is there a way I can group these items  by Company and run the path functions as new columns on them Tried the below dax function but it thre me an error

 

Path = SUMMARIZE(Data,Data[Company_Id],"Path",PATH(Data[Employee_Id],Data[Supervisor_Id]))
 
Thanks,
Brian Alva

 

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@brianalva , Create combine columns and try

 

Employee_Code = [Company_id] & "-" & [Employee_ID]

SupervisorCode = [Company_id] & "-" & [Supervisor_id]

 

 

or try a new column like  , I have not tested this

calculate(PATH(Data[Employee_Id],Data[Supervisor_Id]), filter(Data, Data[Company_id] = earlier(Data[Company_id])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
amitchandak
Super User IV
Super User IV

@brianalva , Create combine columns and try

 

Employee_Code = [Company_id] & "-" & [Employee_ID]

SupervisorCode = [Company_id] & "-" & [Supervisor_id]

 

 

or try a new column like  , I have not tested this

calculate(PATH(Data[Employee_Id],Data[Supervisor_Id]), filter(Data, Data[Company_id] = earlier(Data[Company_id])))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thanks @amitchandak, The formula did not work but the concatenation did.

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors