Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing two columns in set analysis

Hi,

I have a fact table which contains Id1, Id2, Type, ItemCount. As per business, there should be a unique combination of Id1 and Id2. But in fact table more than one Id2 value is available for a particular Id1 value.

So to find out the unique combination, we have another table which contains Id1 and UniqueId2.

I want to show the sum of ItemCount for each Id1 which have the Type = 'A'....like count(if(Id2=UniqueId2 and Type='A',ItemCount))

But this value should not be changed by the selections in "Type" filter...

How to achieve this?

1 Solution

Accepted Solutions
gandalfgray
Specialist II
Specialist II

Try:

sum({<Type={'A'}>} if(Id2=OriginalId,Item_Count))

View solution in original post

2 Replies
gandalfgray
Specialist II
Specialist II

Try:

sum({<Type={'A'}>} if(Id2=OriginalId,Item_Count))

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Try this.

    sum({1<Id2 = p(OriginalId), Type = {"A"}>}Item_Count)

Regards,

Kaushik Solanki

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