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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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

https://www.linkedin.com/in/luca-d-elicio-74a481158/

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

https://www.linkedin.com/in/luca-d-elicio-74a481158/

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

https://www.linkedin.com/in/luca-d-elicio-74a481158/

Tnx, it works!

happy to help you

Luca D'Elicio

https://www.linkedin.com/in/luca-d-elicio-74a481158/

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.