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: 
Not applicable

Hi, can any tell what is wrong with this expression? It is not limiting data where PODistributionID is less than 1? =count(DISTINCT {<[ACCHier Description4]={"NON PAY"},[APInvDist.LineTypeLookupCode]-={'TAX'},APInv.CreationDate={"$(= '>=' & '01/04/2015' &

Hi,

can any tell me what is wrong with this expression?

It is not limiting data where APInvDist.PODistributionId is less than 1?

=count(DISTINCT {<[ACCHier Description4]={"NON PAY"},APInv.CreationDate={"$(= '>=' & '01/04/2015' & '<=' & '31/03/2016')"},APInvDist.PODistributionId={"<1)"}>}[APInv.InvoiceId])

thanks in advance

3 Replies
petter
Partner - Champion III
Partner - Champion III

It seems like you have a bracket out of place at the end:

"<1)"  should be "<1"

and I would put square brackets around the field names in the set expression too...

Anonymous
Not applicable
Author

Hi, thanks for that.

I still seem to be having a problem though counting distinct?

I am counting distinct [APInv.InvoiceId] but it is counting the lines rather than invoice unless I select the invoice and then it counts correctly.

any ideas?

petter
Partner - Champion III
Partner - Champion III

The field [APInv.InvoiceId] might be not the invoice# - it could actually be an unique identification of each line accross all invoices.

So check if you have an "Invoice Number" that you can count distinct instead ....