Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stjernvd
Partner - Creator
Partner - Creator

Resident Load Error

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?

1 Solution

Accepted Solutions
ramoncova06
Specialist III
Specialist III

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]

View solution in original post

4 Replies
ramoncova06
Specialist III
Specialist III

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]

stjernvd
Partner - Creator
Partner - Creator
Author

Thank you!

stjernvd
Partner - Creator
Partner - Creator
Author

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

ramoncova06
Specialist III
Specialist III

"group by" should be used when using any QV aggregation function, for more info on QV aggregation check this post

Use Aggregation Functions!

the "order by" works as it would work on SQL SQL ORDER BY Keyword