Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
demaina1995
New Contributor III

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
Valued Contributor

Re: set modifiers to compare two dimensions

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

or

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

5 Replies

Re: set modifiers to compare two dimensions

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

demaina1995
New Contributor III

Re: set modifiers to compare two dimensions

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

sas_fundm
New Contributor II

Re: set modifiers to compare two dimensions

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"...

demaina1995
New Contributor III

Re: set modifiers to compare two dimensions

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
Valued Contributor

Re: set modifiers to compare two dimensions

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

or

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