Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
xarapre7
Creator II
Creator II

Getting the total for 1st and 2nd filter values

Hi All!

I have a metric in a text box called, <5 days and a filter called Close Bucket with ff values: 24 hrs, 1-3 days, 4-5 days, 6-10 Days.

I'm using  set analysis as follows:

=Num(if(len([Close Bucket])>1,(vLess5ToClose), if(len([Close Bucket])<1,vLess5, '0')),'#,##0')

 vLess5ToClose  as:

= If(
(Num(Count({$<[Close Bucket]= {'24 hour'}>} Distinct [ID])
+Count({$<[Close Bucket]= {'1-3 Days'>} Distinct [ID])
+Count({$<[Close Bucket]= {'4-5 Days'>} Distinct [ID]),'#,##0')),

If((
  if(len([Close Bucket] ='6-10 Days') >1,1,0)
       )>=1,'0', count(Distinct[ID])))

 vLess5 as:

=If((if(len([Close Bucket] ='1-3 Days') >1,1,0) +
    if(len([Close Bucket] ='4-5 Days') >1,1,0) +
    if(len([Close Bucket] ='6-10 Days') >1,1,0)
       )>=1,'<N/A>',
Num(Count({$<[Close Bucket]= {'24 hrs'>} Distinct [ID])
+Count({$<[Close Bucket]= {'1-3 Days'>} Distinct [ID])
+Count({$<[Close Bucket]= {'4-5 Days'>} Distinct [ID]),'#,##0'))

 

My expression is giving me the result expected except that when I’m selecting just the values, 24 hrs and 1-3 days, it’s still giving me the total for the <5 days (which is the total of 24 hrs, 1-3 days and 4-5 days).  What should be the correct set analysis for this?

Labels (1)
0 Replies