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

error in load data

What does this error mean?
 
The following error occurred:
Aggregation expressions required by GROUP BY clause.
 
The error occurred here:
Load ItemID, CurrentStock, CurrentStockValue, CurrentStock / CurrentStockValue as ItemCost Resident Stock Group By ItemID
Labels (1)
2 Replies
deepanshuSh
Creator III
Creator III

Hi, 

It seems like you are not following the the correct syntax for using the group by function. You have to use an aggregation function like max, sum, count....etc. for using the group by function. 

if you are just using a normal division or addition, group by clause is not needed. 

 

Trial and error is the key to get unexpected results.
Vegar
MVP
MVP

Why are you using group by. It is not necessary unless you want to do aggregations in your script.

 

Try 

Load ItemID, CurrentStock, CurrentStockValue, CurrentStock / CurrentStockValue as ItemCost

Resident Stock ;

 

OR (if you want to aggregate)

Load ItemID, sum( CurrentStock), sum

(CurrentStockValue) , sum(CurrentStock) /sum( CurrentStockValue) as ItemCost

Resident Stock Group By ItemID;