Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
DS14
Partner - Contributor III
Partner - Contributor III
Author

Hi Simran,

MTD_VOL is not a field, its expression, i am calculating MTD_VOL = (TTL / UOM),

How can i use this logic in set analysis as MTD_VOL={">0 <40"}.

sunilkumarqv
Specialist II
Specialist II

Hi Deepak,


If((TTL / UOM) >0 and (TTL / UOM) <40,Count({$<DISC_TYPE={'F'}>}CUST_CD)+ Count({$<DISC_TYPE={'F'}>}DIST_CD) ))


can you try using above expression and let us know

simran04
Contributor II
Contributor II

Hi Deepak,

Can't you make the field MTD_VOL i.e. (TTL / UOM) in the backend and then just use MTD_VOL in the set expression.


Thanks,

Simran

DS14
Partner - Contributor III
Partner - Contributor III
Author

No its not possible to make field in the backend, so I want to calculate it frontend only.

DS14
Partner - Contributor III
Partner - Contributor III
Author

can we create composite key on front end for CUST_CD and DIST_CD like (CUST_CD&DIST_CD), so we don't need to define count expression twice.

Is that possible by this way?

sunilkumarqv
Specialist II
Specialist II

can you try

If((TTL / UOM) >0 and (TTL / UOM) <40,Count({$<DISC_TYPE={'F'}>}CUST_CD+DIST_CD) )

are

or

create a variable =

vComp = CUST_CD+DIST_CD


If((TTL / UOM) >0 and (TTL / UOM) <40,Count({$<DISC_TYPE={'F'}>} $(vComp ) ) )