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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
3 Replies
tresesco
MVP
MVP

Missing  Group By clause may be?

Anil_Babu_Samineni

Avg should need Group By. Without that it won't work for aggregate functions like Sum, Avg, Count ... in script

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jhoef-pv
Contributor III
Contributor III

Hi Agrim,
Avg need group by

for example:

table:

load

field_1,

if(((Avg([Rating #])))='1', 'a', if(((Avg([Rating #])))=2, 'b')) as classification

from table.xls

group by  field_1;