Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Sra1bandi
Contributor III
Contributor III

Two different tables data

Table 1:-

id   status1

1      Error 

2      completed

3     Errore

4      Cancelled

 

Table 2:-

id   status2

1    Cancelled

2      completed

3     Cancelled

4     completed

This is already developed app by someone now we got new requirement  i.e,

When the Status1 from table1 shows===>  "Error" in table2==> status2  also need to show as==> "Error". Id is the common field for both tables so many fields are there in two tables but Id is primary key and status field needs to change as above mentioned.

both are different tables not joined in backend how i need to show Status2 as Error when status1 shows Error 

Regards,

Sra1.

Labels (1)
3 Replies
BrunPierre
Partner - Master
Partner - Master

Table1:
Mapping LOAD * Inline[
ID,STATUS1
1,Error
2,Completed
3,Error
4,Cancelled ]
Where Match(STATUS1,'Error');

Table2:
LOAD *,
ApplyMap('Table1',ID,STATUS2) as STATUS
Inline[
ID,STATUS2
1,Cancelled
2,Completed
3,Cancelled
4,Completed ];

DROP Field STATUS2;
RENAME Field STATUS to STATUS2;

EXIT SCRIPT;
Sra1bandi
Contributor III
Contributor III
Author

 There are so many ID's which are errors not single id 

BrunPierre
Partner - Master
Partner - Master

Hi @Sra1bandi 

Try again with the above modified script. Values of Status2 are retained when there is no match.