Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Master
Master

Why Qlik View still remember my OLD script ?

Hi All

My below script work fine , only issue is when i try to rename the excel TAB name from BRAND to COUNTRY_A it have issue.
The Situation :-

if i change from :-
FROM C:\Users\Paul Yeo\OneDrive - ISDN Holdings Limited\Raw Data Input\MapBrand.xlsx (ooxml,embedded labels, table is [BRAND]);
To below :-
FROM C:\Users\Paul Yeo\OneDrive - ISDN Holdings Limited\Raw Data Input\MapBrand.xlsx (ooxml,embedded labels, table is [COUNTRY_A]);

i Will keep same Erroe Massage Below :-

Field not found - <Brand_>
MapDescTDS:
Mapping LOAD
[Brand_],
[SubBrand_]
FROM C:\Users\Paul Yeo\OneDrive - ISDN Holdings Limited\Raw Data Input\MapBrand.xlsx(ooxml,embedded labels, table is [COUNTRY_A])

When i have change excel Tab name from BRAND TO COUNTRY_A
and below :-
FROM C:\Users\Paul Yeo\OneDrive - ISDN Holdings Limited\Raw Data Input\MapBrand.xlsx (ooxml,embedded labels, table is [COUNTRY_A]);

it there any other work around ?

Hope some one can advise me.

Paul Yeo

MapDesc:
Mapping LOAD
[Brand_],
[SubBrand_]
FROM MapBrand.xlsx (ooxml,embedded labels, table is [TDS]);

// sales COUNTRY A
sales:
LOAD left(FileBaseName(), 4) AS Report_dod_1,
@50:60T as [date],
'TDS' as SOURCE,
ApplyMap('MapDesc',@282:298T,'OTHERS') as [BRAND_C],
@282:298T as [BRAND],
if(@241:248T = '2',@134:147T*-1,@134:147T) as [sales]
FROM C:\Users\Paul Yeo\Dropbox\5 QV_Final\QV_RAW\Q_DOD_2018.txt (ansi, fix, no labels, header is 0, record is line);


tmp:
LOAD
min(date) AS MinDate,
max(date) AS MaxDate
RESIDENT sales;
MaxMinDate:
NOCONCATENATE LOAD
MIN(MinDate) AS MinDate,
MAX(MaxDate) AS MaxDate
RESIDENT tmp;
DROP TABLE tmp;
LET varMinDate = Num(Peek('MinDate'));
LET varMaxDate = Num(Peek('MaxDate'));
LET vToday = num(today());
DROP TABLE MaxMinDate;
//*************** Temporary Calendar ***************
TempCalendar:
LOAD
$(varMinDate) + rowno() - 1 AS Num,
date($(varMinDate) + rowno() - 1) AS TempDate,
date($(varMinDate) + rowno() - 1) AS D,
year($(varMinDate) + rowno() - 1) AS Y,
month($(varMinDate) + rowno() - 1) AS M,
date(monthstart($(varMinDate) + rowno() - 1), 'MMM-YYYY') AS MY
AUTOGENERATE $(varMaxDate) - $(varMinDate) + 1;

MasterCalendar:
LOAD TempDate AS date,
day([TempDate]) as [day],
num(month([TempDate])) as [month],
Y AS year
RESIDENT TempCalendar
ORDER BY TempDate ASC;
DROP TABLE TempCalendar;

4 Replies
Highlighted
Specialist III
Specialist III

Are you saving your excel after changing sheet name in excel ?
if yes , there should not be any issue , you can provide some sample file then i can help you
Highlighted
Master
Master

Hi Gold

I am unable to simulate the issue. Because it will not happen when I using the sample file. It will happen when I run the actual script.

Paul Yeo
Highlighted
Specialist III
Specialist III

have you tried to recreate script? , i would suggest create a new app and test it
Highlighted
Master
Master

Hi Sir

Thank you for your advise. I will try it.

Paul