Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In load script, I use
(Price- min(Price)) /(max(Price)-min(Price)) as normalized_Price
then error comes with "Invalid expression"
Any idea why this is invalid expression? How can I apply normalization or standardization to column?
(sum(Price)- min(Price)) /(max(Price)-min(Price)) as normalized_Price
It says it's invalid expression..😥😢
You need a "Group By" in your Load statement. Otherwise the Min() and Max() will not work.
Something like
tmpData:
Load
ProductGroup,
Price
From Table;
Left Join
Load
ProductGroup,
Min(Price) as MinPrice,
Max(Price) as MaxPrice
From Table Group By ProductGroup;
Data:
Load
(Price-MinPrice) /(MaxPrice-MinPrice) as normalized_Price,
*
Resident tmpData;
Drop Table tmpData;