Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Newbie seeking Syntax Help - Count

Hi,

I am still learning the basics of QlikView and would appreciate some help.

This may not be even close to the correct syntax, but I have been unable to  find (or use trial and error) the correct syntax / operators.

This is an expression from a chart object (a dial) and I am looking to add up all of the instances for the three "COUNT Scenarios" below...

=SUM(COUNT({<

STATUS={'Completed','Processed'},

TASK_TYPE={'Receipt'},

TASK_DURATION={"<=3"}

COUNT({<

STATUS={'Completed','Processed'},

TASK_TYPE={'Confirmation'},

TASK_DURATION={"<=5"}

COUNT({<

STATUS={'Completed','Processed'},

TASK_TYPE={'Order'},

TASK_DURATION={"<=1"}

>}TASK_REF)

Obviously, it doesn't work - but I can not work out how to fix it.

Any help will be appreciated !!

Thanks,

Jonathan

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi,

Is this what you are looking for? (Counting all three possible instances of TASK_REF)

=COUNT({<
STATUS={'Completed','Processed'},
TASK_TYPE={'Receipt'},
TASK_DURATION={"<=3"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Confirmation'},
TASK_DURATION={"<=5"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Order'},
TASK_DURATION={"<=1"}
>} TASK_REF)

Hope that helps.

Miguel

View solution in original post

7 Replies
Miguel_Angel_Baeyens

Hi,

Is this what you are looking for? (Counting all three possible instances of TASK_REF)

=COUNT({<
STATUS={'Completed','Processed'},
TASK_TYPE={'Receipt'},
TASK_DURATION={"<=3"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Confirmation'},
TASK_DURATION={"<=5"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Order'},
TASK_DURATION={"<=1"}
>} TASK_REF)

Hope that helps.

Miguel

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Did you expected this result?

    

COUNT({<

STATUS={'Completed','Processed'},

TASK_TYPE={'Receipt','Confirmation','Order'},

TASK_DURATION={"<=5"} TASK_REF)

Celambarasan

Not applicable
Author

Miguel,

That is great, thank you - exactly what I was looking for.

It does however highlight something else that I must now learn.

As you may have guessed, I am calculating SLA performance metrics.

I have used your suggestion as follows:

=COUNT({<
STATUS={'Completed','Processed'},
TASK_TYPE={'Receipt'},
TASK_DURATION={"<=3"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Confirmation'},
TASK_DURATION={"<=5"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Order'},
TASK_DURATION={"<=1"}
>} TASK_REF)

/

COUNT({<

STATUS={'Completed','Processed'},

TASK_TYPE={'Receipt','Confirmation','Order'}

>} TASK_REF)

It now says "No data to display" - my guess is because we have not yet had any instances of "Confirmation" or "Order".

Is there an easy fix?

Many thanks

Jonathan

Not applicable
Author

Miguel,

That is great, thank you - exactly what I was looking for.

It does however highlight something else that I must now learn.

As you may have guessed, I am calculating SLA performance metrics.

I have used your suggestion as follows:

=COUNT({<
STATUS={'Completed','Processed'},
TASK_TYPE={'Receipt'},
TASK_DURATION={"<=3"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Confirmation'},
TASK_DURATION={"<=5"}
> + <
STATUS={'Completed','Processed'},
TASK_TYPE={'Order'},
TASK_DURATION={"<=1"}
>} TASK_REF)

/

COUNT({<

STATUS={'Completed','Processed'},

TASK_TYPE={'Receipt','Confirmation','Order'}

>} TASK_REF)

It now says "No data to display" - my guess is because we have not yet had any instances of "Confirmation" or "Order".

Is there an easy fix?

Many thanks

Jonathan

Miguel_Angel_Baeyens

Hi Jonathan,

If you try both COUNT() in different text objects, for example, do you get any result for both? Do you have any selection done when showing the chart?

Hope that helps.

Miguel

Not applicable
Author

Miguel,

Thank you - after much digging into detail, it is now working.

It seems that it may have been the QlikView equivalent of an Excel #DIV/0 error.

All working, and I have learnt some new syntax.

Thanks for your help...

Jonathan

Not applicable
Author

Miguel,

Thank you - after much digging into detail, it is now working.

It seems that it may have been the QlikView equivalent of an Excel #DIV/0 error.

All working, and I have learnt some new syntax.

Thanks for your help...

Jonathan