Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
aheavy95
Creator
Creator

error with sum

Hi all,

In my project, im trying to create a new table that contains the yearly salary of an employee.

As I load, I get an Invalid expression error, I figured the problem is with the aggregation by the 2 dimensions, though it doesnt work even when I remove one of them.

How can I solve this?

thanks

 

 

aheavy95_0-1652599791575.png

 

 

 

Labels (3)
1 Reply
vchuprina
Specialist
Specialist

Hi @aheavy95 ,

you should add group by 

NoConcatenate:
SP_YEARLY_EARNINGS:
LOAD
    BusinessEntityID     AS SalesPersonID,
    year(OrderDate)      AS year,
    sum(earningsPerSale) AS yearly_earnings
RESIDENT SP_YEARLY_EARNINGS_temp
Group By BusinessEntityID, year(OrderDate);

DROP TABLE SP_YEARLY_EARNINGS_temp;

Regards, 

Vitalii

 

Press LIKE if the given solution helps to solve the problem.
If it's possible please mark correct answers as "solutions" (you can mark up to 3 "solutions").