Hi everyone, i'm having a little trouble trying to solve a particular case.
In my original table i have 167 different columns, each one with every case possible., some are empty, some are filled, and some have the same data the other columns have.
What I am trying to do is create a new column (Final_VAR), that concatenates all the non-empty and only distinct variables!
Here is na example of what I have today:
Id | Var_1 | Var_2 | Var_3 | Var_4 |
1 | text_1 | text_2 | text_3 | text_4 |
2 | text_2 | text_2 | text_2 | text_2 |
3 | text_1 | text_3 | | |
4 | text_3 | text_3 | | |
5 | text_4 | text_5 | text_4 | text_5 |
The result should be like this:
Id | Final_Var
1 | text_1 - text_2 - text_3 - text_4
2 | text_2
3 | text_1 - text_3
4 | text_3
5 | text_4 - text_5
I've tried already using CATX, CAT, and CATT, and useid options to remove the blank spaces, but still can't figure out this case, can someone please help me?
P.S. Sorry about my english, i'm from Brazil!