Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Create a new field using multiple field values in the Load statement
ID | Field1 | Field2 | Field3 |
1 | A_Categ | ||
2 | B_Categ | C_Categ | |
3 | C_Categ | ||
4 | A_Categ | ||
5 | B_Categ | ||
6 | B_Categ | ||
7 | A_Categ | ||
8 | C_Categ | ||
9 | A_Categ | ||
10 | B_Categ | C_Categ |
Ex result:
ID | Combine field |
1 | A_Categ |
2 | B_Categ |
2 | C_Categ |
3 | C_Categ |
Perhaps this
Table:
CrossTable(Delete, [Combine field])
LOAD * FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/Create-a-new-field-using-multiple-field-values/m-p/1...]
(html, codepage is 1252, embedded labels, table is @1);
Final:
NoConcatenate
LOAD Distinct ID, [Combine field] Resident Table Where Len([Combine field])>0;
DROP Table Table;
Try using Crosstable ()
Crosstable (Field, [combined field], 1)
Load * from table ;
Thanks for the response, Is it possible to create using If condition or something, instead of Crosstable, as I'm having more values in the columns to ignore, sorry I didn't mention in the sample data.
Ex:
If(Match(Field1,'A_Categ'), 'A_Categ',
If(Match(Field2,'B_Categ'),'B_Categ',
If(Match(Field3,'C_Categ'),'C_Categ')) as Test1
When you say you have many, I won't prefer the If..Else condition as it is required in your requirement rather I would go CrossTable() only. If CrossTable() not required what you expect, you should explain little more where it fails