I’m trying to take column names from user as parameter, you can see in screenshot, then i’m trying to filter duplicate on that particular columns which are passed as parameter. how i can do that?
In this case you could concatenate all the values of the columns that need to be deduplicated into a single column, and then deduplicate that column.
In order to decide which columns should be included in the concatenation, you can use an expression that utilizes the eval() function. What I did here was calculate the first column name by getting, from the parameter, any text that is before the first comma. Then, to find the second column name, I get the text between the first and the second comma. However, this second concatenation should only happen when there’s actually something after the second comma. And you could continue this function for up to 10 columns for example, or as many as you think will be the maximum number of columns the user will enter.
I attach the sample project:
Deduplicate dynamic columns.morph (3.9 KB)
Initial data + parameters:
Calculation of “Column to deduplicate”:
Deduplication of this new column:
Remove this column to have the deduplicated original data:
Brilliant way of doing it Thanks man.