Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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"
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.