Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Is path to your file correct?
Is the file Telecommunication folder?
Feeling Qlikngry?
Put a semi-colon (;) after 'AutoGenerate 31' in the previous tab (for all such cases too).
Hi,
You need semicolon (;) before Activation: LOAD ...
That's what's missing
yes
FROM
(biff, embedded labels, table is Sheet1$);
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$);
Now I see, your For..Next loop is not correct.
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.
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