Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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