Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
DS14
Partner - Contributor III
Partner - Contributor III

Range Bucket

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.

15 Replies
DavidŠtorek
Creator III
Creator III

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)

sunny_talwar

or this

Count({$<MTD_VOL = {">0<40"}, DISC_TYPE = {'F'}>}DISTINCT CUST_CD&DIST_CD)

DS14
Partner - Contributor III
Partner - Contributor III
Author

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.

DS14
Partner - Contributor III
Partner - Contributor III
Author

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.

DavidŠtorek
Creator III
Creator III

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) ))

arvind1494
Specialist
Specialist

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 )

sunny_talwar

Would you be able to share a sample to show what you have and what you are looking to get?

DS14
Partner - Contributor III
Partner - Contributor III
Author

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.

simran04
Contributor II
Contributor II

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)