Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

syntax error

I Change my Script like this where I  do mistake

Activation:

LOAD [Activation Date],

     [ActivationMonthYear],

     [Cease Date],

     [Cease Status],

     City,

     MonthYear,

     MSISDN,

     Region,

     Revenue,

     [Revenue Date],

     [Revenue Day],

     [Revenue Month],

     [Revenue MonthYear],

     [Revenue Year],

     State

FROM

Activation.xls

(biff, embedded labels, table is Sheet1$);

Temp:

load

  [Activation Date],

  MonthStart([Activation Date]) as [Activation MonthStart],

  Year([Activation Date])as[Activation Year],

    Month([Activation Date])as[Activation Month],

    Date(Monthstart([Activation Date]))as ActivationMonthYear,

  [Cease Date],

  Month([Cease Date]) as[Cease Month],

  Year([Cease Date]) as[Cease Year],

  Day([Cease Date]) as[Cease Day],

  Week([Cease Date]) as[Cease Week],

   Date(Monthstart([Cease Date])) as[Cease MonthYear] Resident Activation;

Region_Revenue:

LOAD Region,

     [Rev Month],

     [Rev Year],

     [Revenue MonthYear],

     [Regional Revenue]

FROM

[region revenue.xls]

(biff, embedded labels, table is Sheet1$);

Projected_RevenueL:

LOAD [Projected Rev Date],

     [Projected Rev Year],

     [Projected Rev Month],

     [Revenue MonthYear],

     MonthSort,

     [Proj Total Rev]

FROM

[Projected revenue.xls]

(biff, embedded labels, table is Sheet1$);

Thanks

Madhu

8 Replies
robert_mika
Master III
Master III

Is path to your file correct?

Is the file Telecommunication folder?

Feeling Qlikngry?

How To /Missing Manual(18 articles)

tresesco
MVP
MVP

Put a semi-colon (;) after 'AutoGenerate 31' in the previous tab (for all such cases too).

Gabriel
Partner - Specialist III
Partner - Specialist III

Hi,

You need  semicolon (;) before Activation: LOAD ...

That's what's missing

Not applicable
Author

yes

FROM

(biff, embedded labels, table is Sheet1$);

Not applicable
Author

For i = 1 to 12

For i= 1 to 31

CaseMonth :

LOAD

Month(MakeDate(2015,$(i))) as Case_Month

AutoGenerate 1;

CaseDate:

LOAD

date(MakeDate(2015,1, RowNo())) as Case_Date

AutoGenerate 31;

NEXT

Activation:

LOAD MSISDN,

     City,

     State,

     Region,

     [Activation Date],

     Monthstart([Activation Date]) as [ActivationMonthStart], 

     Year([Activation Date])as [ActivationYear],

     Date(Monthstart([Activation Date]), 'MMM YYYY') as ActivationMonthYear ,

     MonthYear,

     Month([Cease Date]) as[Cease_Month],

     Year([Cease Date])as [Cease_Year],

    Week([Cease Date]) as[ Cease_week],

     Date(Monthstart([Cease Date]), 'MMM DD YYYY') as [Cease_MonthYear],

     [Cease Status],

     Revenue,

     [Revenue Date],

     [Revenue Day],

     [Revenue Month],

     [Revenue MonthYear],

     [Revenue Year]

FROM

(biff, embedded labels, table is Sheet1$);

tresesco
MVP
MVP

Now I see, your For..Next loop is not correct.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

This code makes no sense. It has a couple of syntax errors, the calendar you seem to want has no structure and doesn't link. Moreover, in your place all months seem to have 31 days... (last time somebody tried to rationalize a calendar was during the French Revolution, and that didn't end all too well for many people)

In addition to that, the calendar doesn't seem to link to the facts table called "Activation". Are you planning to use Date Islands?

I think it would be better for you to describe what you are after, so that we can help you with your data model and the creation of a corresponding script. If you want.


Peter.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I found the thing that may have been annoying you from the start.

The syntax error is caused by 'AS' keywords that are glued together with square brackets, like in

:

Week([Cease Date]) as[ Cease_week],

:

Put at least one space after each AS keyword, and the syntax error will go away.

Peter