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: 
marcel-kro
Contributor
Contributor

Count function

Hello,

I am quite new to Qlik and have no real knowledge yet. So I apologize for what is probably a very simple question for you.

I would like to make an evaluation where I would like to count the number of our invoices using the count function.

The problem is that the same field which is called "Document No." also contains delivery note numbers.

I only want to count the invoices that start with AR....

Which settings should I make?

I hope you can help me

 

Labels (2)
1 Solution

Accepted Solutions
igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

Hello and welcome to the Green side of the Force.

Please, try this:

 

Count({$<[Document No]={"AR*"}>} Distinct [Document No])

 

Check out my latest posts at datavoyagers.net

View solution in original post

5 Replies
igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

Hello and welcome to the Green side of the Force.

Please, try this:

 

Count({$<[Document No]={"AR*"}>} Distinct [Document No])

 

Check out my latest posts at datavoyagers.net
Vaibhav_Pathak
Contributor II
Contributor II

Hello Marcel,

Try like this -

COUNT(IF(Document No. LIKE 'AR*' , Document No.))

Thanks.

igoralcantara
Partner Ambassador/MVP
Partner Ambassador/MVP

If statements are usually not recommended in expressions, since it provides a worse performance than Set Analysis, which is what I am proposing above.

Check out my latest posts at datavoyagers.net
Vaibhav_Pathak
Contributor II
Contributor II

Okay. Thanks for the information.

marcel-kro
Contributor
Contributor
Author

It works perfect. Thank a lot for helping.