Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

Fields not syncing in the table

Fields are not syncing when I use if condition

Script:

Table:
LOAD ID,
key,
value,
If(key='A', source_value) as FieldA,
If(key='B', source_value) as FieldB,
If(key='C', source_value) as FieldC;
SQL SELECT *
FROM dbo.Table1;

 

Output:

Capture.JPG

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

With your code you still have 3 different rows rather than combining them into 1 single row.
What you are asking for is the opposite of crosstable load. so you need generic load.
check below link for details
https://community.qlik.com/t5/Qlik-Design-Blog/The-Generic-Load/ba-p/1473470
rubenmarin

Or use a group by or even applymap but as Dilipranjith says original data has 3 rows, so 3 rows are loaded and something has to be done to merge in one row.