Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
geminihzh
Valued Contributor

variable value empty in calendar

Hi, all,

I use 2 variable as the vStartDate and vEndDate to get a arbitrary date range. And also create a trigger to return the value of vStartDate and vEndDate if a date range is selected from the Date dimension.

This works before when I use "D-M-YYYY" format, which is the default format of the system. And now I changed all to use "DD.MM.YYYY" format, then Input box object performs the same as before, but the Calender will only show the value of the variables if you select the date in the calender. The two variables still get the date value back if Date dimension is selected, but in the calender, the value dose not display anymore!!!

In the attached .qvw, you can see that the calendar objects Start and End are empty, but  the calender objects S and E have the value from the 2 variables.

Note: when I provide the 2nd example with DateOld dimension for comparison, for some reason, the selection on the DateOld dimension dose not work as well. And normally vS and vE should change if you select on DateOld.

I tried to change the format in the calendar as well, but it dose not work.

BTW, I use the newest version 11.20 SR9

Any one has any clue?

Thanks very much

Zhihong

11 Replies
geminihzh
Valued Contributor

Re: variable value empty in calendar

Still an open issue for us. Thought we work around this by adding a text object to show the date in the calender. But it  can cause ugly layout problem. Dose anyone have a clue about this?

Thanks

Zhihong

Re: Re: variable value empty in calendar

How about something like this ?

geminihzh
Valued Contributor

Re: Re: variable value empty in calendar

Hi, Bill,

Yes, you are correct, We can first keep using "D-M-YYYY" format, and change to "DD.MM.YYYY" in the final step to display the date, though more date related columns need to be changed in the final step, but it works.

Thanks   

Re: variable value empty in calendar

in my qvw all the date are stored, compared & manipulated as QlikView dates.

You can display them in whatever format you wish, without affecting any processing or logic ?

geminihzh
Valued Contributor

Re: variable value empty in calendar

Hi, Bill,

Thanks for your reply, the thing is like this. For the date, it is a format thing, and it dose not break the logic in the dash, even when we use "DD.MM.YYYY".

The default date after LOAD from the script is "D-M-YYYY". As the client need "DD.MM.YYYY" format in the dash for all columns, text and calender object, so we changed the format in the LOAD script (as in my .qvw file). As we think by doing this we do not need to modify the format every where in the dash. Then it caused a problem in the date display in the calender object. But no logic is affected. From your reply, then I realize that we can keep using "D-M-YYYY" format. And modify the date format when we need to display it as "DD.MM.YYYY".

Re: variable value empty in calendar

In your load script you can set the default date format like this :

     SET DateFormat='DD.MM.YYYY';

So dates will by default always be displayed in that format, unless you manually override it.

geminihzh
Valued Contributor

Re: variable value empty in calendar

Hi, Bill,

Yes, we tried this, then we have problem to display it in the calender object. If use a trigger in date field, and select date, the variables used for the calender object get the correct value, but the value never show up. That is the problem I have in the first place. 

Re: Re: variable value empty in calendar

Have a look at the attached.

Everything is stored as QlikView dates and :

  • The default date format is D-M-YYYY
  • All dates are displayed in D-M-YYYY format
  • All the calendar objects, triggers & date selections display & work ok
geminihzh
Valued Contributor

Re: Re: variable value empty in calendar

Hi, Bill,

Thanks for your time. I am sorry that my description confused you, but you did not understand my issue. In my original .qvw file, I gave tow examples, one using "D-M-YYYY", all works perfect, the calendar, tiggers and date selection, just like your. And I never mentioned that I have problem when using date format as '"D-M-YYYY". The second example in my .qvw file is using "DD.MM.YYYY", and all other work except the calendar.