Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

keithblythe
New Contributor

Load Script Error

Hello, I am attempting to use a load script to summarize a quantity by month from a few different data sources.  Within the data sources the quantity is for a specific date.  I will ultimately want to display this data in a table (or pivot table) by month.  I commented out most of my script and it currently only includes the following logic:

LOAD

    Date("Ship Date",'MMM-YYYY') as "Ship Date",

    "Sold-to pt",

    "Sold To Name",

    Plnt,

    Material,

    Description,

    sum(Open),

    SU,

    1 as Source   

FROM [lib://Judy/futuredemand.qvd]

(qvd) group by Plnt, [Sold-to pt], Material, [Ship Date];

The goal here is to summarize the Open value by plant, sold-to, material and ship date (month/year).

I get the follow error:

The following error occurred:

Invalid expression

The error occurred here:

LOAD

    Date("Ship Date",'MMM-YYYY') as "Ship Date",

    "Sold-to pt",

    "Sold To Name",

    Plnt,

    Material,

    Description,

    sum(Open),

    SU,

    1 as Source   

FROM [lib://Judy/futuredemand.qvd]

(qvd) group by Plnt, [Sold-to pt], Material, [Ship Date]

The following error occurred:

Invalid expression

The error occurred here:

?

Does anyone have any suggestions for the cause of this error?

Thank you

2 Replies
OmarBenSalem
Esteemed Contributor

Re: Load Script Error

when u use an aggregation in the script, u have to group by all the other fields:

load

"Ship Date",

    "Sold-to pt",

    "Sold To Name",

    Plnt,

    Material,

    Description,

    sum(Open),

    SU,

  Source 

group by Plnt, [Sold-to pt], Material, [Ship Date], "Sold To Name", Description,  SU,  Source 

LOAD

    Date("Ship Date",'MMM-YYYY') as "Ship Date",

    "Sold-to pt",

    "Sold To Name",

    Plnt,

    Material,

    Description,

   (Open),

    SU,

    1 as Source  

FROM [lib://Judy/futuredemand.qvd]

(qvd) ;

keithblythe
New Contributor

Re: Load Script Error

Thank you!

Community Browser