Forum Discussion

anupambit1797's avatar
anupambit1797
Iron Contributor
Jun 02, 2023

Power Query, Transform

Dear Experts,

                  During Transformation in Power Query, in say below example in all columns I want to Split the column using the De-limiter as ":" , but I have to do them one by one, is there a way to select the columns where same "Delimiter" need to be used for splitting columns instead of repetitive tasks for each Column one-by-one?

 

 

Thanks & Regards

Anupam Shrivastava

5 Replies

  • Lorenzo's avatar
    Lorenzo
    Silver Contributor

    Hi anupambit1797 

     

    In attached file a custom M function named TableSplitColumns that takes 2 arguments:

    - The Table tat contains column(s) to split

    - The Delimiter to split the columns

     

    The function does:

    #1 Takes the 1st record of the Table to...

    #2 identify the fields/columns that contain the specified Delimiter

    #3 With https://learn.microsoft.com/en-us/powerquery-m/list-accumulate splits each column identified at #2

    • anupambit1797's avatar
      anupambit1797
      Iron Contributor

      LorenzoCan you please share all the steps you followed for this.. I attach a sample excel with columns all needing the same delimiter ":" , so from here once you load it into Power Query , then what Steps to be followed?

       

      Many Thanks ,

      Br,

      Anupam

      • Lorenzo's avatar
        Lorenzo
        Silver Contributor

        anupambit1797 

         

        Why do I see a double-header when I open your file?:

         

        Can row #2 be deleted before anything else? If not please explain

Resources