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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
vinothkumar1990
Helper II
Helper II

Hierarchy output

Hi All,

I came across some below hierarchical requirment. I have two columns called COL1 and COL2 and want to derive the value (MAP). 

COL1 and COL2 have 4 type of relationships i.e. 1:1, 1:M, M:1, M:M.

 

Explanation - For example

Explanation - For example

1. XX1 is mapped to A1 (temp result XX1 : A1)
2. A1 is mapped to XX3 (temp result XX1, XX3 : A1)

3. A1 is mapped to XX3 (temp result XX1, XX3 : A1)

4. XX3 is mapped to A8 (temp result XX1, XX3 : A1, A8)

5. A8 is mapped to XX9 (temp result XX1, XX3, XX9 : A1, A8)

 

 

Is there anyway to achive?

InputInputOutput
COL1COL2MapType
XX1A1XX1,XX3,XX9 : A1,A8M:1
XX2A2XX2,XX4 : A2M:1
XX3A1XX1,XX3,XX9 : A1,A8M:1
XX4A2XX2,XX4 : A2M:1
XX5A3XX5:A31:1
XX6A4XX5:A4,A51:M
XX6A5XX5:A4,A51:M
XX7A6XX7,XX8:A6:A7M:M
XX7A7XX7,XX8:A6:A7M:M
XX8A6XX7,XX8:A6:A7M:M
XX8A7XX7,XX8:A6:A7M:M
XX3A8XX1,XX3,XX9 : A1,A8M:M
XX9A8XX1,XX3,XX9 : A1,A8M:M
3 REPLIES 3
lbendlin
Super User
Super User

What you describe sounds more like a network graph than a hierarchy. Hierarchies by definition must be 1:M  (ok, with a corner case of 1:1).

Daniel29195
Super User
Super User

@vinothkumar1990 

 

im not sure if this would help  : 

go to power query ,

use the split by column feature : 

Daniel29195_0-1707063738109.png

 

Daniel29195_2-1707063786870.png

 

 

 

 

you will have the following :

Daniel29195_4-1707063871526.png

 

 

 

 

 

 

 

 

Again -->  split by columns -->  by delimiter -->  

Daniel29195_3-1707063847238.png

 

 

 

 

 

 

you will have the bfollowing : 

Daniel29195_5-1707063888385.png

 

 

 

 

 

 

last step : 

select Map-2 column, --> split by columns -->  by delimiter -->  

 

Daniel29195_6-1707063931808.png

 

 

 

 

 

final result : 

 

Daniel29195_7-1707063941456.png

 

 

 

if this is not what you are looking for , please share an example of the output you want . 

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

@Daniel29195 - COL1 and COL2 are the data present in input file where as "Map" is the output which i need to derive using COL1 and COL2.

 

Explanation - For example

1. XX1 is mapped to A1 (temp result XX1 : A1)
2. A1 is mapped to XX3 (temp result XX1, XX3 : A1)

3. A1 is mapped to XX3 (temp result XX1, XX3 : A1)

4. XX3 is mapped to A8 (temp result XX1, XX3 : A1, A8)

5. A8 is mapped to XX9 (temp result XX1, XX3, XX9 : A1, A8)

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors