Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to Count Distinct CUST_CD&DIST_CD where DISC_TYPE = F and MTD_VOL<40&>0. Can anyone suggest how to set range in set ananlysis.
Hi,
if I understand wel,than following should help you
Count({$<MTD_VOL={">0<40"},DISC_TYPE={'F'}>}CUST_CD)+ Count({$<MTD_VOL={">0<40"},DISC_TYPE={'F'}>}DIST_CD)
or this
Count({$<MTD_VOL = {">0<40"}, DISC_TYPE = {'F'}>}DISTINCT CUST_CD&DIST_CD)
MTD_Vol is not a field, i am calculating it using expression, so that expression how i can use in set analysis for particular range.
MTD_Vol is not a field, i am calculating it using expression, so that expression how i can use in set analysis for particular range.
And is it problem for you to calculate it in a script? Than you could use our suggestions above.
Otherwise you will have to use an IF statement. Something like
If(MTD_VOL expression >0 and MTD_VOL expression<40,Count({$<DISC_TYPE={'F'}>}CUST_CD)+ Count({$<DISC_TYPE={'F'}>}DIST_CD) ))
Try following expression :
Count({<DISC_TYPE = {'F'},MTD_VOL={">0<40"}>}Distinct CUST_CD)
+
Count({<DISC_TYPE = {'F'},MTD_VOL={">0<40"}>}Distinct DIST_CD )
Would you be able to share a sample to show what you have and what you are looking to get?
I am calculating volume from table Invoice_details and Production_hierarchy using fields TTL and UOM
i.e volume = (TTL / UOM)
and logic in which i have to use MTD_Volume is
(0<X<10):
Count of Distinct CUST_CD&DIST_CD in CUSTOMER where VISI/NVISI = VISI in CUSTOMER and MTD_VOL<10&>0.
Hi Deepak,
Try the following statement.
Count( {<DISC_TYPE = {'F'}, MTD_VOL={">0 <40"}>} distinct CUST_CD)
+
Count( {<DISC_TYPE = {'F'}, MTD_VOL={">0 <40"}>} distinct DIST_CD)