This space is for everyone to ask questions related to the Community Platform. It's a space for us to get to know each other and have some fun! Come in and gather around the Water Cooler!
Hi,
I have a following requirement.
Table 1 - 150 columns
Table 2 - 150 columns (same columns as table 1)
I need to compare these two tables and check if there are any values for these 150 columns that differ at a given minimum and maximum date selection.
Need help with edit script about how to process this data and also how can I visualize this?
Any suggestion would be a great help! Thanks in advance.
This is kind of an ugly hack and I could probably clean it up, but (replacing Table1 and Table2 loads with your data), the following should work (adapted to your full list of fields of course).
Note that myCount lets you know which table the not-identical row is from - 1 is from table1, 2 is from table2.
Table1:
Load * INLINE [
Field1, Field2, Field3
A, B, C
1, 2, 3
E, F, G
];
Table2:
NoConcatenate Load * Inline [
Field1, Field2, Field3
A, B, C
1, 4, 7
Z, Z, Z
];
myTable:
Noconcatenate Load *, '1' as Source Resident Table1;
Concatenate(myTable)
Load *, '2' as Source Resident Table2;
Drop Table Table1;
Drop Table Table2;
MergedTable:
Load Field1, Field2, Field3, sum(Source) as myCount
Resident myTable
GROUP BY Field1, Field2, Field3;
Drop Table myTable;
FinalTable:
Noconcatenate Load *
Resident MergedTable
WHERE myCount <3;
Drop table MergedTable;
@rukunobu can you share a sample data ( 3 or + columns) and the expected output ?
This is kind of an ugly hack and I could probably clean it up, but (replacing Table1 and Table2 loads with your data), the following should work (adapted to your full list of fields of course).
Note that myCount lets you know which table the not-identical row is from - 1 is from table1, 2 is from table2.
Table1:
Load * INLINE [
Field1, Field2, Field3
A, B, C
1, 2, 3
E, F, G
];
Table2:
NoConcatenate Load * Inline [
Field1, Field2, Field3
A, B, C
1, 4, 7
Z, Z, Z
];
myTable:
Noconcatenate Load *, '1' as Source Resident Table1;
Concatenate(myTable)
Load *, '2' as Source Resident Table2;
Drop Table Table1;
Drop Table Table2;
MergedTable:
Load Field1, Field2, Field3, sum(Source) as myCount
Resident myTable
GROUP BY Field1, Field2, Field3;
Drop Table myTable;
FinalTable:
Noconcatenate Load *
Resident MergedTable
WHERE myCount <3;
Drop table MergedTable;
@rukunobu Are you using Qlik Sense or QlikView? I would like to move this into the correct product forum. Thank you.