Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have been trying to do a resident load and it worked for me earlier but now I keep getting error in Syntax messages.
Here is my script:
[Original Table]:
LOAD Stock,
Day,
Month,
Year,
Close,
[No. of Shares]
FROM
(ooxml, embedded labels, table is [Stock Value]);
[Stock Growth]:
LOAD
Stock,
Day,
Close,
[No. of Shares],
Sum(Close)*Sum([No. of Shares])as[Stock Value]Resident[Original Table]group by Stock,Day
What am I doing wrong?
because you are using the Close and No of Shares as fields and not metrics they also need to be part of you group
though for this you can go without an aggregation
[Stock Growth]:
LOAD
Stock,
Day,
Close,
[No. of Shares],
Close*No. of Shares] as [Stock Value]
Resident [Original Table]
because you are using the Close and No of Shares as fields and not metrics they also need to be part of you group
though for this you can go without an aggregation
[Stock Growth]:
LOAD
Stock,
Day,
Close,
[No. of Shares],
Close*No. of Shares] as [Stock Value]
Resident [Original Table]
Thank you!
Actually one last question: when do you use 'group by' in resident load and when do you not?
Also, difference between 'group by' and 'order by'?
Thank you
"group by" should be used when using any QV aggregation function, for more info on QV aggregation check this post
the "order by" works as it would work on SQL SQL ORDER BY Keyword