Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average in Load Resident Table not working getting invalid expression error ?

Hi,

I am new to qlikview.

any help would b appreciated.

I am trying to do calculate Average with group by in Load Resident statement but it's not working.

I am getting invalid expression error.

Example :

TEST:

Load
OrderNumber,

AVG(Items)

Resident Test1
GROUP BY
OrderNumber;

can someone help me ?

12 Replies
jpapador
Partner - Specialist
Partner - Specialist

Have you tried aliasing the field so:

Avg(Items) as AvgItems

its_anandrjs

Try different way see the load script

Eg:-

Test1:

Load * from Location;

Noconcatenate

TEST:

Load
OrderNumber,

AVG(Items) as Items  //Give the name to this file is important

Resident Test1
GROUP BY
OrderNumber;


Drop Table Test1;

Not applicable
Author

thanks for your reply.

I had tried and gave alias,

but, still, it's not working

do you have any other suggestions ?

Not applicable
Author

TEST:

Load
OrderNumber,

AVG(Items) as [Item Avg]

Resident Test1
GROUP BY

OrderNumber;

Not applicable
Author

Thanks for your reply.

still, it's not working.

do you have any other alaternatives ?

Not applicable
Author

Do you have your qvw we can look at?

jpapador
Partner - Specialist
Partner - Specialist

I think anand may be onto something, try putting the no concatenate before the load, so like:

TEST:

Noconcatenate Load
OrderNumber,

AVG(Items) as Items 

Resident Test1
GROUP BY
OrderNumber;


Drop Table Test1;

eduardo_sommer
Partner - Specialist
Partner - Specialist

Hi, Can you please share a sample of the Test1 Table with us? I would like to understand the meaning of the field items. Is it the number of items of an entire Order?

Eduardo

maxgro
MVP
MVP

post the logfile of your reload

same name as your qlik doc, same folder,

enable it in menu --> settimgs --> document --> general --> generate logfile