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

LOAD SUM Invalid expression

Getting  Invalid expression  error when loading sum expression in script

Thanks

"Invalid expression

INVOICES:

load *,

FAMILYDES as FamilyTot,

EFAMILYDES as EFamilyTot,

INVQuant as TotINVQuant,

InvSellPriceNIS/InvExchangeUSD AS InvSellPriceUSD1,

InvSellPriceNIS/InvExchangeEURO AS InvSellPriceEURO1,

InvSellPriceDNIS/InvExchangeUSD AS InvSellPriceDUSD1,

InvSellPriceDNIS/InvExchangeEURO AS InvSellPriceDEURO1,

TotInvSellPriceNIS/InvExchangeUSD AS TotInvSellPriceUSD1,

TotInvSellPriceNIS/InvExchangeEURO AS TotInvSellPriceEURO1,

Sum(INVQuant) as [INVQuant Total]

Resident INVOICES1

Group By FAMILYDES , EFAMILYDES

Order By FAMILYDES , EFAMILYDES"

1 Reply
oknotsen
Master III
Master III

In order for an aggregation (sum) to work, you will have to add all other fields to your "group by" statement.

If you only want to do the aggregation over a few fields, do the load process in two statements and join the tables.

May you live in interesting times!