Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ptl14495
New Contributor

Count if

Hi,

I have a table with two fields i want to use as a condition to count the number of orders that fulfill that condition.

Something like,

If ( Actual Response Time > Contractual Response time, Count ( Order No ), if not don't count )

I am not confortable doing it in script so i need a solution if possible, as an expression.

thank you

Fernando Rodrigues

1 Solution

Accepted Solutions

Re: Count if

Oh so they all come from the same table? Is it possible that all Order No_ meet the condition? Can you check this by creating a table like this

Dimensions

Order No_

Actual Response Time (Hours)

Response Time

Measure

[Actual Response Time (Hours)] > [Response Time]

and see if you are seeing  any 0s or not?

15 Replies

Re: Count if

May be this

Count({<[Order No] = {"=[Actual Response Time] > [Contractual Response time]"}>} [Order No])

Re: Count if

Alternatively, you can use an if statement

Count(If([Actual Response Time] > [Contractual Response time], [Order No]))

ptl14495
New Contributor

Re: Count if

Hi,

the formulas has some error. It can't be aplied.

I have tried to reposition the " and {} but with no success.

Can you help please?

thank you

Re: Count if

Where exactly are you trying to use this? Can you show an image of the error that you are seeing?

ptl14495
New Contributor

Re: Count if

count or if.JPG

Re: Count if

I see no error, this expression gives 0 as result?

ptl14495
New Contributor

Re: Count if

the result is the count of all order no.

Re: Count if

Did you try this?

Count(If([Actual Response Time] > [Contractual Response time], [Order No]))

ptl14495
New Contributor

Re: Count if

order count.JPG

Community Browser