Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

paulyeo11
Valued Contributor II

master calendar only row 1 have year month the rest missing value

Hi All

I have create a master calendar using the below script :-

MasterCalendar:

LOAD TempDate AS date_time,

    Date(Monthstart([TempDate]), 'YY MMM')                          as YearMonth,

  MY AS MonthYear,

    D     AS Day,

    M     AS Month,

  Y AS year

RESIDENT TempCalendar

ORDER BY TempDate ASC;

DROP TABLE TempCalendar;

My issue is YearMonth field does not recode the date_time only the first row , and give the rest of the row missing value , where i make the mistake ?

Paul

1 Solution

Accepted Solutions

Re: master calendar only row 1 have year month the rest missing value

Hi Paul, all your rows in master calendar has his YearMnoth field with value.

Problem is you are getting date and time in your date_time field, so master calendar only has values for each day at 3:28:23 PM, other "times" in the same date has no relation with master calendar.

So you need to link with master calendar only with date, no time, and it should work

3 Replies

Re: master calendar only row 1 have year month the rest missing value

Hi Paul, all your rows in master calendar has his YearMnoth field with value.

Problem is you are getting date and time in your date_time field, so master calendar only has values for each day at 3:28:23 PM, other "times" in the same date has no relation with master calendar.

So you need to link with master calendar only with date, no time, and it should work

fernando_tonial
Valued Contributor

Re: master calendar only row 1 have year month the rest missing value

You have use only field date format or number, without time.

Best Regards.

Tonial.

paulyeo11
Valued Contributor II

Re: master calendar only row 1 have year month the rest missing value

Hi Ruben

Now working fine , after i convert field which have date and time into month and year , now working fine.

Paul