Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Thanks in advance
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)
In straight table try like simple if with count()
count(if(ColumnA<>ColumnB,1,0))
Regards,
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
];
May be like this?
Count({<ID={"=[Column A]<>[Column B]"}>}ID)
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)
Yes you are correct.
I will go with tresesco solution.
Regards,