Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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?

4 Replies
Anonymous
Not applicable
Author

at script level

like:

load

InvoiceID,

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
Author

Hi Balra

j

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?

Regards

Charles

ogster1974
Partner - Master II
Partner - Master II

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

Anonymous
Not applicable
Author

yes, Take InvoiceID as Dimension

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