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

Use function Sum, Avg, and Count within a script

Is it possible to use the functions sum, avg and count in a script (LOAD Customer, Sum (Sales) as Sales, Count (No Order) as controls NB Resident invoice;)?

every time I use one of these functions have an error Espression

thank you

1 Reply
isaiah82
Creator III
Creator III

Sure, you can use these in a script but you would have to use a GROUP BY clause in your LOAD statement (similar to, but different than sending a GROUP BY clause in an SQL statement.)

Example:

LOAD Customer, Sum(Sales), Count([No Order]) as controls
RESIDENT Invoice
GROUP BY Customer


If your source is a table file, SQL, etc. the syntax may be a little different.  -Isaiah