@kbi
Looks like you can use the hierarchy functions for this. Is that what you are trying to get to? If not, I dont see a reason to change the data from how you have it since it is in tabular form and that’s what works best and easiest with DAX and Power Query.
I need to convert the Persons Responsible into columns as I need to distribute this file to the business to fill in the persons for each cost center. It would make more sense for them to go by unique cost center and fill in the persons horizontally.
Plus I would need to look up these unique cost centers into a hierarchy before distributing to the business areas. That way they can identify their cost center areas more easily.
The returned file will be input into my Row-Level Security roles.
That’s why I really need the file in columnar format.
@kbi
See the file attached. I broke out all the steps in Powery Query so you could see them, but you could really combine a few of those. This wasnt a hierarchy issue, but basically:
Group my Cost Center and Aggregate by All Data
New Column to select the “Person Responsible” column from each sub-table from #1
New column to convert #2 into a list
New column using List.Accumulate
List.Accumulate(
[Custom.1],“”,(state,current) => state&" || "& current)
( you can do #4 in 1 step )
Remove the misc columns you dont need (or may not even be there if you combined steps 2 to 4)
Split the column from #4 by the delimiter used, but only on the left most this time. Then remove that column
Split the remaining column by the delimiter, but at every occurence.