Hi All,
I have a table like below, I would like to apply a condition that if the columns Topic2 to Topic4 are the same as Topic1 then make them null else retain the same value.
For this requirement, I made created several if conditions for each of the columns.
is there an easier way?
Topic1 | Topic2 | Topic3 | Topic4 |
Sustainability | Sustainability | Sustainability | Sustainability |
Sustainability | Sustainability | Sustainability | Sustainability |
Sustainability | Sustainability | Sustainability | Sustainability |
Climate change | Sustainability |
I'd create a flag field that is something like this
if [Topic2] = [Topic3] and [Topic3]=[Topic4] then 1 else 0 endif
Now you can put a formula on [Topic2]
if [flag] = 1 then null() else [Topic2] endif
and the same for Topic3 and Topic4
then all a Select to remove the flag 🙂
Hi @Manjari
You can use Multi-field formula tool like below. Which will be applied on multiple columns.
Hope this helps : )
Hi @Manjari
If this is not the expected output can you please provide more complex sample input and expected output it will help us get a better understanding of the usecase.
Hi @Manjari,
I would do it with a transpose then a cross tab as below.
This way you could add topic columns and it would handle them automatically, and you only need one simple formula.
See attached example.
Regards,
Ben