Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a two Data field and one stock filed and one stockcode field. i.e DATE1,DATE2,STOCKQTY,STOCKCODE.
Now i am writing one expression which is giving me correct answer.
i.e COUNT(DISTINCT IF(DATE1=DATE2 AND STOCKQTY>0, STOCKCODE))
now i want to write same thing in SET ANALYSIS . BUT I AM UNABLE TO WRITE THE CORRECT SYNTAX.
CAN ANYONE HELP ME???????
BECAUSE I WANT SIMULTANEOUSLY FOR LAST CONSECUTIVE MONTHS WHAT IS STOCKCODE COUNT????
You can try
Count({< STOCKQTY = {">0"} >} DISTINCT IF(DATE1 = DATE2, STOCKCODE))
Avoiding that failure in set analysis.
Hello,
As far as I'm concerned, syntax would be something like (untested):
Count({< DATE1 = DATE2, STOCKQTY = {">0"} >} DISTINCT STOCKCODE)
Expression within brackets is the set analysis.
Regards.
Hi,
Thanks for reply. But unfortunately it is not giving the correct answer. it is giving me count is 0.
Are dates in the same format? I took into account DATE1 and DATE2 as fields, is that correct?
hi,
Both are fields. Ans both are same format because if they are bot in same format then how output is coming when i write COUNT(DISTINCT IF(DATE1=DATE2,CODE)0
You can try
Count({< STOCKQTY = {">0"} >} DISTINCT IF(DATE1 = DATE2, STOCKCODE))
Avoiding that failure in set analysis.
Hi Miguel,
It's working fine. Thanks for your reply.