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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count

Hi All,

can any one help me to get the expression to find the count,

I have a table like below , if a person has active Product sales less than 3000 for consecutive dates then count is 1 if not count is zero.

how to achieve this with set analysis.

        Edited: 

Expected Result is

   

A2
B1
C1
D1

DateActive ProductsalesPerson
3/16/20131100A
3/17/20132500A
3/18/20132000B
3/19/20132000B
3/20/20132000A
3/21/20133500B
3/22/20132900A
3/23/20132500A
3/24/20132500C
3/25/20132500C
3/26/20133250D
3/27/20132500D
3/28/20132640D
3/29/20132500D
3/30/20136000C
3/31/20134200D
11 Replies
prajapatiamar38
Creator II
Creator II

Hi

=count({<ActiveProductSales={'<3000'}>}Person)

try this

sunilkumarqv
Specialist II
Specialist II

Check

padmanabhan_ram
Creator II
Creator II

Hope this is what you expect

prajapatiamar38
Creator II
Creator II

Hi sorry try this:

=count(DISTINCT {< ActiveProductSales={'<3000'} >}Person)

Not applicable
Author

Thanks Padmanabhan Ramakrishnan.

No it is not working, and it is not checking consecutive dates  ,  if I change the below product sales value to 1500 count should be 2 for A, but it is not showing it.

3/16/20135000A
Not applicable
Author

Thanks Amarnath Prajapati,

No it is not working, and it is not checking consecutive dates  ,  if I change the below product sales value to 1500 count should be 2 for A, but it is not showing it.

3/16/20135000A
malini_qlikview
Creator II
Creator II

Hi,

Try this in the expression of the straight table,

=If(Above(Num(If(Sum([Active Products])<3000,Day(Date))))+1=Day(Date),1,0)

See attached,

You can hide the date column in the table finally.

Not applicable
Author

Thanks Malini Chandrasekar,

No it is not working, and it is not checking consecutive dates  ,  if I change the below product sales value to 1500 count should be 2 for A, but it is not showing it.

3/16/20135000A

and I want out put like above, I don't want to see the repeated persons.

krishna20
Specialist II
Specialist II

Hi,

Please find the attached app.

Regards

Krishna