Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
micheledenardi
Specialist II
Specialist II

Compare Unliked Tables using set analysis

Dear all, 

i have to solve this exercise where the datamodel is composed by two unlinked tables like:

Table1:
Load * Inline [
OrderT1,QtyT1
1,1
2,2
3,3];

Table2:
Load * Inline [
OrderT2,QtyT2
1,11
2,22
3,33];

 

The goal is to obtain a final table like this, where we can compare the quantites of there two tables and check where QtyT1 is different from QtyT2  using only set analysis, so without additional load script.

micheledenardi_0-1714726838657.png

 

any idea?


Thanks

 

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

No, it's not possible because a set analysis is quite the same as a selection and if the data aren't connected they couldn't be related with a selection.

Thinkable are if-loops - BUT linking unconnected data in an object in the UI means that a cartesian product is created as base and the if-loops would be needed as filter. Such approach could have a massive impact on the performance even by rather small data-sets and beside crashing the application or even the server there are also serious risks that the RAM limitation of the object prevents the wanted view.

View solution in original post

3 Replies
marcus_sommer

The data must be associated to each other, maybe quite simply like:

Table1:
Load *, 'T1' as Source Inline [
Order,Qty
1,1
2,2
3,3];

concatenate(Table1)
Load *, 'T2' as Source Inline [
Order,Qty
1,11
2,22
3,33];

 

and then Source could be used as horizontal dimension in a pivot or as set analysis condition.

micheledenardi
Specialist II
Specialist II
Author

Thanks Marcus,

ok, thanks, i was hoping about a set analysis trick to achieve by keeping unlinked the tables 🙂

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
marcus_sommer

No, it's not possible because a set analysis is quite the same as a selection and if the data aren't connected they couldn't be related with a selection.

Thinkable are if-loops - BUT linking unconnected data in an object in the UI means that a cartesian product is created as base and the if-loops would be needed as filter. Such approach could have a massive impact on the performance even by rather small data-sets and beside crashing the application or even the server there are also serious risks that the RAM limitation of the object prevents the wanted view.