Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

COUNT and MIN functions

Hi,

I'm receiving an error when using the COUNT and MIN functions within an IF Statment in my script.

Am I allowed do this or is there another reason for the error?

Thanks

LEFT JOIN (TEST)
LOAD Delivery_VBELN.LIKP as [Delivery Docket],
    
     if(count([Pick Date_KODAT.LIKP]) > 1, min(date([Pick Date_KODAT.LIKP],'YYYY-MM-DD')), date([Pick Date_KODAT.LIKP],'YYYY-MM-DD')) as [Picking date2]
FROM
D:\QlikViewReports\LIKP_header.QVD
(qvd)

GROUP BY Delivery_VBELN.LIKP

1 Reply
hic
Former Employee
Former Employee

The second parameter of the if function doesn't contain any aggregation function. It should. Most likely this causes the error.

HIC