Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
vdcastro
Partner - Contributor III
Partner - Contributor III

Master Calendar - Field Not Found

Hello guys,

i have a weird problem. I am developing an application.

I developed it in QlikView Desktop and it's ok.

Now i want to put it on QlikView Server. When i reload my application on QlikView Server it fails. I receive this error on the log:

2016-07-19 14:26:44 0395 LOAD

2016-07-19 14:26:44 0396 Date() + Iterno()-1 As TempDate

2016-07-19 14:26:44 0397

2016-07-19 14:26:44 0398 AutoGenerate 1 While  + IterNo() -1 <=

2016-07-19 14:26:44      Error: Error in expression:

2016-07-19 14:26:44      Date takes 1-2 parameters

So i tried to find the problem and i detected it on my MasterCalendar:

Temp:

Load

  min(%Data) as minDate,   

  max(%Data) as maxDate

Resident Cartas;

Let varMinDate = floor(Num(Peek('minDate', 0, 'Temp'))); 

Let varMaxDate = floor(Num(Peek('maxDate', 0, 'Temp')));

drop table Temp;

TempCalendar: 

LOAD 

  $(varMinDate) + Iterno()-1 As TempDate

AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);

MasterCalendar:

NoConcatenate

Load

  Distinct

    TempDate as  %Data,

    Date(TempDate) as  Data.Data,

    Year(TempDate) as Data.Ano,

    Month(TempDate) as Data.Mes,

    Monthname(TempDate) as Data.AnoMes,

    WeekName(TempDate) as Data.AnoSemana,

  'T' & ceil(month(TempDate) / 3) as Data.Trimestre,

    num(Day(TempDate),'00') as Data.Dia,

    WeekDay(TempDate) as Data.DiaSemana,

    Week(TempDate) as Data.SemanaNum

//    if(WeekDay(TempDate)='Sábado' or WeekDay(TempDate)='Domingo',0,1) as Data.Work_Day

Resident TempCalendar;

Let varMinDate = null(); 

Let varMaxDate = null();

Is it normal the same code run without problems on QlikView Desktop and fail on QlikView Server?

Can someone helps me?

Greetings

1 Solution

Accepted Solutions
swuehl
MVP
MVP

It's not normal, but it can happen that the same script returns different results on different servers.

I assume that your regional settings are different on both servers and that your date field %Data is interpreted differently in both environments:

Temp:

Load

  min(%Data) as minDate,  

  max(%Data) as maxDate

Resident Cartas;

Check the outcome of the Temp table, I assume your fields won't show numbers.

If so, check your %Data field in your Cartas table, if it's interpreted corretly as date field, showing a numeric representation.

Why don’t my dates work?

View solution in original post

1 Reply
swuehl
MVP
MVP

It's not normal, but it can happen that the same script returns different results on different servers.

I assume that your regional settings are different on both servers and that your date field %Data is interpreted differently in both environments:

Temp:

Load

  min(%Data) as minDate,  

  max(%Data) as maxDate

Resident Cartas;

Check the outcome of the Temp table, I assume your fields won't show numbers.

If so, check your %Data field in your Cartas table, if it's interpreted corretly as date field, showing a numeric representation.

Why don’t my dates work?