Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Change the Column content withot create a new column

So, i have a table that has a column with tables, like in the image below:

 

I wanted to get only the 15 first rows from the tables from the column "Personalizar.Data". I wass able to do that creating a new column called "Emissão", as showed on the next image:

 

And so it goes with other treatments. Always creating a new column with what i want to change on the tables and excluding the previous one.

 

My question is: there's a way to do all the treatments without creating a new column and removing the previous one? Like just changing the "Personalizar.Data" over and over?

 

Sorry for my bad english! Hope you guy can understand!

  • try the function of Table.TransformColumns

    NewStep=Table.TransformColumns(PreviousStepName,{"Personalizar.Data",each Table.FirstN(_,15)})

3 Replies

  • wdx223_Daniel's avatar
    wdx223_Daniel
    Icon for Community Champion rankCommunity Champion

    try the function of Table.TransformColumns

    NewStep=Table.TransformColumns(PreviousStepName,{"Personalizar.Data",each Table.FirstN(_,15)})

    • Anonymous's avatar
      Anonymous
      Not applicable

      It worked fine. Thanks again, Daniel!!!

      Just a question, if you don't mind: why did you use the underline on the Table.FirstN function instead of the column's name?

      • wdx223_Daniel's avatar
        wdx223_Daniel
        Icon for Community Champion rankCommunity Champion

        that's M syntax, it comes in pair with "each", means each value in the column of "Personalizar.Data"