Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Power BI - Use List to Generate Column Headers when Splitting Column by Delimiter

Hi,   I want to be able to dymanically name Column Headers from a List when splitting a field by a delimiter.   I'm using 2 parameters to split my column by a delimiter - one to give the delimite...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi amitchandak ,

     

    I figured out how to do this.

     

    Rather than having the List.Transform function select the number of columns, I added referenced my list here, then amended the "each" clause to it pulled the name from the list. As below:

     

    = Table.SplitColumn(#"Added Data Source", "Taxonomy_Campaign", Splitter.SplitTextByDelimiter(#"DV360 Campaign Name - Delimiter", QuoteStyle.Csv), List.Transform(#"DV360 Campaign Name - Fields", each Text.From(_)))

     

    Thanks,

    Mark