Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Unique invoice mark

Good day

Please assist, i need to create a unique invoice count on a straight table as shown on the attachment.

I need to show a 1 for the top original unique invoice and a 0 for all other duplicates of that invoice number.

For excel i would normally use the formula:   =IF(A2<>A1,1,"")

What is the good solution for qlikview using sql data source?

Tags (1)
4 Replies
Esteemed Contributor

Re: Unique invoice mark

at script level




if(InvoiceID=previous(InvoiceID),1,0) as Unique Invoice Count

From TableName;

Else at UI level, simply write:

=count(distinct InvoiceID) as Expression in Straight Table    or sum([Unique Invoice Count])

Not applicable

Re: Unique invoice mark

Hi Balra


Thanks for the response.

I would still want to display the 1 and 0 on the straight table for the unique count and duplicate respectively.

Do you have an expression formula for that?



Honored Contributor II

Re: Unique invoice mark

Separate your tables the unique invoice data in one the version data in another.  The counts Balraj has suggested will work just fine.

Esteemed Contributor

Re: Unique invoice mark

yes, Take InvoiceID as Dimension

Expression= just put simple filed name [Unique Invoice Count] as expression

Community Browser