Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I exclude certain objects when counting in an expression?

Hello

I am new to QlikView so please be patient with me. I may not use the correct terminology for things. [:)]

I would like to make an expression that counts each object in a field that have a connection to another field.

To clarify I can explain the scenario:
I have a field containing invoices (or rather their IDs). An invoice can have two different types (purchase or sales), but lack a field separating the two. However, I can see wether an invoice is connected to a purchase or a sale by looking at the fields of those objects.

I simply want to count all the invoices that ONLY are connected to sales, and exclude the purchase invoices. For example:

**** count (InvoiceID, if (PurchaseID is unavailable) ****

I appreciate any help I can get, even if it's just a tip on where I can find this kind of information.

//Johannes

1 Solution

Accepted Solutions
Not applicable
Author

Try this: count(if(len(PurchaseID)=0, InvoiceID))

It is recommended to use len(Field) rather than isnull(field) as the isnull() function is unreliable in some environments (64-bit).

View solution in original post

2 Replies
Not applicable
Author

Try this: count(if(len(PurchaseID)=0, InvoiceID))

It is recommended to use len(Field) rather than isnull(field) as the isnull() function is unreliable in some environments (64-bit).

Not applicable
Author

Thank you very much! Worked like a charm. You just made my day. Big Smile