I have my meta data in a generation format. However I need to load it to a data base using Parent child hiearchy.
Generation 1 Generation 2 Generation 3 Generation 4
The World Europe Sweden Stockholm
The World Europe Sweden Gothenburg
The World Europe Norway Oslo
The World Asia Thailand Bangkok
The World Asia Japan Tokyo
So I want to convert this data to:
Parent Child
The World
The World Europe
The World Asia
Europe Sweden
Europe Norway
Asia Thailand
Asia Japan
Sweden Stockholm
Sweden Gothenburg
Norway Oslo
Thailand Bangkok
Japan Tokyo
Is there an easy method to do this.
The opposite can be done with ease in PowerPivot using Dax (using Path, Pathlength and, pathitem formulas) as described e.g. here https://www.daxpatterns.com/parent-child-hierarchies/
If there is an easy way to do this in PowerQuery or PowerPivit or if anyone have a macro where I can define number of levles in the generation hiearchy I would highly appreciate if you could share it with me.
Generation 1 Generation 2 Generation 3 Generation 4
The World Europe Sweden Stockholm
The World Europe Sweden Gothenburg
The World Europe Norway Oslo
The World Asia Thailand Bangkok
The World Asia Japan Tokyo
So I want to convert this data to:
Parent Child
The World
The World Europe
The World Asia
Europe Sweden
Europe Norway
Asia Thailand
Asia Japan
Sweden Stockholm
Sweden Gothenburg
Norway Oslo
Thailand Bangkok
Japan Tokyo
Is there an easy method to do this.
The opposite can be done with ease in PowerPivot using Dax (using Path, Pathlength and, pathitem formulas) as described e.g. here https://www.daxpatterns.com/parent-child-hierarchies/
If there is an easy way to do this in PowerQuery or PowerPivit or if anyone have a macro where I can define number of levles in the generation hiearchy I would highly appreciate if you could share it with me.