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: 
Mike_Solfosko
Contributor
Contributor

Invalid Expression using max and group by

Hi everyone,

I'm having some issues with my script.

If someone could help me I would really appreciate.

Shop:
NoConcatenate
LOAD
distinct name_shop,
Address,
City,
Sales
FROM [lib://DataFiles/shop.csv]
(txt, utf8, embedded labels, delimiter is ';', msq);

Temp:
LOAD
distinct name_shop,
Address,
City,
max(Sales) as max_sales
resident shop

Group By name_shop;

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You should add few more fields in group by statement of yours.

Temp:
LOAD
name_shop,
Address,
City,
max(Sales) as max_sales
resident shop

Group By name_shop,Address,City;

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You should add few more fields in group by statement of yours.

Temp:
LOAD
name_shop,
Address,
City,
max(Sales) as max_sales
resident shop

Group By name_shop,Address,City;

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Mike_Solfosko
Contributor
Contributor
Author

Thank you, it worked perfectly