Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting repeating value

Hi,

I am new to QView and I am trying to count the number of Purchase Orders.  My data source is from Excel and the Purchase Order numbers will repeat for some lines.  My task is to count the number of Purchase orders and should only count as 1 for lines where the Purchase Order repeats.  Can you guide with the script to store on a temp table the Purchase Order number and store it, and for the next line to check if the Purchase Order already exist or not, it not, count +1 , otherwise the count remains.

Please help.

3 Replies
swuehl
MVP
MVP

Try it like this using a GROUP BY clause with your field:

LOAD

     OrderNo,

     count(OrderNo) as Count

RESIDENT YourTable GROUP BY OrdeNo;

Gysbert_Wassenaar

If you simply want to total number of unique purchase orders you can use this expression:  =fieldvaluecount('PurchaseOrder')

replace PurchaseOrder with the real name of the field with the purchase order numbers


talk is cheap, supply exceeds demand
walterlh
Creator II
Creator II

Count(Distinct(Ordenes))