3 Replies Latest reply: Mar 1, 2017 10:27 PM by Roll IWSP

# Count with two conditions

Hello Sense Community,

I am rather new to QilkSense and required your help for the following question.

E.g. given the following priority data.

 Priority P1 P2 P3 P4 P5 1 >150% >150% >110% >150% >90% 2 .. .. .. .. .. 3 .. .. .. .. ..

AND

 OverDuePercent WorkType 98% P1 161% P2 111% P2 100% P2 125% P5 101% P1 … …

I planned to use the priority as Measures (1, 2 and 3).

I have looked for the count statement with condition and came out with the following.

count({<OverDuePercent={'>150'}, WORKTYPE={'P1','P2','P4'}>} WorkNum)

However, I cant seems to add another condition of >110 P3 or >90 P5 into the count.

What i want to achieve is something like this in excel using countifs with multiple conditions:

countifs(OverduePercent=">150", WorkType="P1","P2","P4", OverduePercent=">110", WorkType="P3")

Thanks!

• ###### Re: Count with two conditions

You want

count({<OverDuePercent={'>150'}, WORKTYPE={'P1','P2','P4'}>} WorkNum)

or count it when overDue>110 and worktype= p3

or count it when overDue>90 and worktype= p5

right?

If so, try this:

count({ <OverDuePercent={'>150'}, WORKTYPE={'P1','P2','P4'}>

+ <OverDuePercent={'>110'}, WORKTYPE={'P3'}>

+<OverDuePercent={'>90'}, WORKTYPE={'P5'}>

} WorkNum)