Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Count function

Hi Experts,

Can any one please help me on below requirement.

I have to calculate  the count when Column A is not matching with Column B based on unique IDs.

Here for the XYZ ID Column A is not Matching with Column B. So i need to get the count as 1.

COUNT.png

Thanks in advance

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Rather, I would think much on this?


If(ColumnA <> ColumnB, 1,0) as Flag


Then, Count({<Flag = {1}>} ID)


Or direct forward

Count({<ColumnA = {"=ColumnA <> ColymnB"}>} ID)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

5 Replies
PrashantSangle

In straight table try like simple if with count()

count(if(ColumnA<>ColumnB,1,0))

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable

try this in script:

load
count(if(Hash128(product)<>Hash128(product1),Customer)) as newcustomercount
;
Load * inline [
Customer,product,product1
A,p1,p1
B,p2,p10
C,p3,p4
D,p5,p6
]
;

tresesco
MVP
MVP

May be like this?

Count({<ID={"=[Column A]<>[Column B]"}>}ID)

Anil_Babu_Samineni

Rather, I would think much on this?


If(ColumnA <> ColumnB, 1,0) as Flag


Then, Count({<Flag = {1}>} ID)


Or direct forward

Count({<ColumnA = {"=ColumnA <> ColymnB"}>} ID)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
PrashantSangle

Yes you are correct.

I will go with tresesco‌ solution.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂