Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Try it like this using a GROUP BY clause with your field:
LOAD
OrderNo,
count(OrderNo) as Count
RESIDENT YourTable GROUP BY OrdeNo;
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
Count(Distinct(Ordenes))