Forum Discussion

elam91's avatar
elam91
New Member
4 years ago

Iterating over every value in table and invoking custom function on it

Hi, I have a table, and a custom function that I created that translates values into different values according to a key. I called it translateText,

I want to take Table1, and create a Table2 that is basically taking every value in Table1 and running it through my function, how can I achieve this?

 

This is what I thpught might work but im not sure...

= Table.ReplaceValue(arabic_answers,oldValue,translateText(oldValue),Replacer.ReplaceText,TableTable.ColumnNames(arabic_answers))

2 Replies

  • Hi elam91 ,

     

    Not sure if I understand what you want to achieve, if you have a custom function you can add a column that calls that function and makes the use of the values within any column of the table.

     

    Can youplease ellaborate better, if you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

    If the information is sensitive please share it trough private message.

  • v-luwang-msft's avatar
    v-luwang-msft
    Community Support

    Hi elam91 ,

    Need more details ,could you pls provide sample data and expect output?

     

     

    Best Regards

    Lucien