Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set modifiers to compare two dimensions

Hello,

I have the two following tables :

OldTable :

IDOld Standard
1ST1
2ST2
3ST2
4ST2

NewTable

IDNew Standard
1ST1
2ST2
3ST2
4ST1

And I would like to have a KPI to count the number of Standard difference between the two tables, that is to say : count(DISTINCT MSN where New Standard is different from Old Standard) but I don't manage to do that.

I don't want to join tables because I have a lot of others columns so it will be very heavy and I need each table to be independant.

If you have any idea, don't hesitate

best regards

1 Solution

Accepted Solutions
zebhashmi
Specialist
Specialist

Count(aggr(if(Old Standard = New Standard,1)ID)

or

sum(aggr(if(Old Standard = New Standard,0,1)ID)

View solution in original post

5 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You can use exists function to know if the record is loaded earlier or not.

Try this,

Table1:

Load ID&OldStandard as Key

From xyz;

Table2:

Load *,if(Exists(Key,ID&NewStandard),'No Different','Different') as Status

From pqr;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Anonymous
Not applicable
Author

thank you very much, this could work ! But I would like to avoid creating a new table because my data is very heavy and it already takes a lot of time to load

Anonymous
Not applicable
Author

Caroline Huet schrieb:

... I need each table to be independant.

Hi Caroline,

...but you know, that Qlik will create an outer join automatically if two tables use same fields? That means your both tables are linked because of the field "ID"...

Anonymous
Not applicable
Author

Yes, I use that link to do some calculations but I don't want to join table with an "outer join" in the data load editor

zebhashmi
Specialist
Specialist

Count(aggr(if(Old Standard = New Standard,1)ID)

or

sum(aggr(if(Old Standard = New Standard,0,1)ID)