Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

group by with num function is not working

Sum_Table2:

LOAD

     PordCode,

     ProdName,

     SIMCode,

     num([Sls Amt],'###0.00') as [Sls Amt],

     num(COGS,'#,##0.00') as COGS,

     num(%COGS,'#,##0.00') as %COGS,

     num([Gr Margin],'#,##0.00') as [Gr Margin],

     num([%Gr Margin],'#,##0.00') as [%Gr Margin]

FROM

[..\Qvds\Item_Margin.qvd]

(qvd);

load

     PordCode,

     ProdName,

    sum( [%Gr Margin])

    //count([%Gr Margin]) as [%Gr Margin]

Resident Sum_Table2

Group By PordCode;

drop table Sum_Table2;

Gives error invalid expression  any body got such issues ?

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
1 Solution

Accepted Solutions
Not applicable

you should group by prodname as well.

group by pordcode, ProdName;

View solution in original post

4 Replies
Not applicable

you should group by prodname as well.

group by pordcode, ProdName;

tresesco
MVP
MVP

Add ProdName as well in the group by clause like:

....

Resident Sum_Table2

Group By PordCode, ProdName ;

vikasmahajan
Author

Thanks

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
vikasmahajan
Author

Thanks

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.