Forum Discussion

Hari01's avatar
Hari01
Frequent Visitor
3 years ago
Solved

Split multiple columns has delimiter into rows

Hi

 

I have a employee and manager data, each employee's manager ID and Name till top level concatenated by delimiter in one column like below

 

EMP IDEMP NameManager ID hierarchy Manager Name
1AA  
4B1AA
7C1>5>6>7AA>N>D>C

 

When I Split both columns ID and Name into rows using Split Column by delimiter option, I'm not getting desired output.

 

EMP ID=7 has three managers in hierarchy( 1 is top level manager for EMP ID=7) , so have to Split into three rows with respective Manger ID and Manager Name like below

 

EMP IDEMP NameManager ID hierarchy Manager Name
1AA  
4B1AA
7C1AA
7C5N
7C6D

 

Any idea how to transform data in power BI M query ?

 

Thanks in advance 

1 Reply