Forum Discussion

Gillard_2's avatar
Gillard_2
Frequent Visitor
3 years ago

Split column

Hi, 

I am hoping to split a single column into multiple, having a column for each licence type. Thanks in advance

Single Column:

Result Columns from above single column:

Office 356 Enterprise E3Power-BI StandardEnterprise Mobility + Security E3Office 365 Enterprise E3Visio Online Plan 2Dynamics 365 Plan 1 Enterprise Edition
YesYesYesYes  
YesYesYes   
Yes   YesYes
  YesYesYes 

5 Replies

Replies have been turned off for this discussion
  • Hi,

    you obtain this

    - split column by delimiter

    - traspose table

    - keep top rows 1 (it is your columnNames)

    - combine the table with your names with the full table (the step before)

    = Table.Combine({ ColumnNames , #"Transposed Table"})

    - promote headers

    If this post is useful to help you to solve your issue, consider giving the post a thumbs up and accepting it as a solution!

     

     

     

    • Gillard_2's avatar
      Gillard_2
      Frequent Visitor

      Apoligies, i dont think i was as clear as i needed to be with the outcome required. The table I posted also have annother column of email addresses (these are all unqiue).

      So the outcome required is as follows:

      Email AdressOffice 356 Enterprise E3Power-BI StandardEnterprise Mobility + Security E3Office 365 Enterprise E3Visio Online Plan 2Dynamics 365 Plan 1 Enterprise Edition
      [email protected]YesYesYesYes  
      [email protected]YesYesYes   
      [email protected]Yes   YesYes
      [email protected]  YesYesYes 
  • wdx223_Daniel's avatar
    wdx223_Daniel
    Community Champion

    NewStep=Table.Combine(Table.ToList(PreviousStepName,each let a=Text.Split(_{1},",") in #table({"Email Address"}&a,{{_{0}}&List.Repeat({"Yes"},List.Count(a))}))

  • Gillard_2's avatar
    Gillard_2
    Frequent Visitor

    Not sure i am clear on all the required steps from the above replies. A more detailed breadown of each step required would be greatly appreciated.

    Thanks in advance