Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis, Multiple Conditions

Hi

I need to count the number of Task_ID_New based on the following conditions:

Completion_Date is less than or equal to Due_Date

Source = Assignments or (Source=Tasks and TASK_TYPE = Product).

I can do get the correct results of Assignments by itself and Tasks by itself but cannot seem to combine them into one chart.

Assume I can use set analysis but have not been able to get the correct results.

Attached is a sample showing all the data in a Table Box and then two separate staight tables.

Want the reuslts of the two combined into one straight table.

Thanks in advance for any and all help.

1 Solution

Accepted Solutions
Not applicable
Author

Hi ,

try the below expression

count(if((

Source='Tasks' and TASK_TYPE='Product' and Completion_Date<=Due_Date)

or

(Source='Assignments'and Completion_Date<=Due_Date),Task_ID_New))

View solution in original post

6 Replies
Not applicable
Author

Hi ,

try the below expression

count(if((

Source='Tasks' and TASK_TYPE='Product' and Completion_Date<=Due_Date)

or

(Source='Assignments'and Completion_Date<=Due_Date),Task_ID_New))

Not applicable
Author

Hi,

try this

=

Count(if((Source ='Assignments' Or (Source='Tasks' and TASK_TYPE = 'Product')) and (Completion_Date <= Due_Date),Task_ID_New))

Niranjan M.

Not applicable
Author

Hi,

try this

=

if(Completion_Date <= Due_Date),Count({<Source ={'Assignments','Tasks' }, TASK_TYPE ={ 'Product'}>}Task_ID_New) )

Hope it helps you!!...

Cheers,

Chandra

Not applicable
Author

hi

see this link

http://community.qlik.com/message/136125

http://community.qlik.com/message/283514

http://community.qlik.com/message/266912

or try it.

IF(Completion_Date <= Due_Date),Count({<Source ={'Assignments','Tasks' }, TASK_TYPE ={ 'Product'}>}Task_ID_New) )

hope it help you.

Gysbert_Wassenaar

Try:

Count(if(Completion_Date <= Due_Date

            and (Source = 'Assignments'

            or (Source = 'Tasks' and TASK_TYPE = 'Product')),

            Task_ID_New))

If you add a unique ID field to your table (i.e. rowno() as ID) you can use a set analysis expression:

count({<Source={'Assignments'},ID={"=Completion_Date<=Due_Date"}>+<Source={'Tasks'},TASK_TYPE={'Product'},ID={"=Completion_Date<=Due_Date"}>} Task_ID_New)


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks everyone for your help!