Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Teun1990
Frequent Visitor

Combine all information from upper hierarchy levels into 1 table

Hi,

 

I made a visual representation of what i would like to achieve in Power Query Editor, as can be found below.

Since in the current situation the dataset is a lot larger (& 'deeper' in hierachy), I would like to avoid using multiple merges over & over again (for performance issues)

Teun1990_0-1688043774896.png

Does anyone have any idea? 

 

Kind Regards,

Teun

 

1 ACCEPTED SOLUTION

Hi ,

try to built the second option i wrote.

I think you can unpivot after you have all the parent column for every id (your first table).

So you'll not have to do the merge for the skill, but you create the relationship with the level details.

Let me know.

Luca D'Elicio

View solution in original post

5 REPLIES 5
lucadelicio
Super User
Super User


OPTION 1
You can try to build a table with n join like the n level of child.

So you obtain a table like this for every child:

ChildParent3Parent2Parent1
7531
1---

 

Then you can:
CONCAT the lookup value of all your level.
And you obtain a string result like this for the child 7:
(g); (e); (c); (a)
for child 1:
(a)

OPTION 2
To have the desire result you have to built a table that contains all the combination:

ChildParentLevel
774
753
732
711

Then you can create the relation beetwen the parent column and the skill table.
And when on pbi ypu create the result table you have to put the child and the skill and you receive what you want.

I hope will help you.
If yes mark it as solutions.
Ciao!

Luca D'Elicio

Hi lucadelicio, 

 

Tnx voor your reply, I found a solution! However I wonder if it can be more efficient. I have to do like 12x merges now..

 

My startpoint is a child + parent1 column. Next i'll do a merge on the same tabel, lookup Parent1 in Child column, expand parent1 to create Parent 2). I repeat this untill Parent 6 to create below view. 

Teun1990_0-1688116038201.png

 

Next, I'll do a merge on Child with another table to find the compentence for the child. + repeat this 7 times ( 7 merges) do this for all parents. Next i'll Unpivot columns & remove duplicates to get my disired view :). 

Teun1990_2-1688116377341.png

 

Do you have any final idea to make this more efficient ? 

 

Kind Regards,

Teun 

 

 

Hi ,

try to built the second option i wrote.

I think you can unpivot after you have all the parent column for every id (your first table).

So you'll not have to do the merge for the skill, but you create the relationship with the level details.

Let me know.

Luca D'Elicio

Tnx, it works!

happy to help you

Luca D'Elicio

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.