Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

stefan_fischer
New Contributor II

Problem with calendar

Hi,

I have a problem with a calendar. One field in my datatable contains a datefield. In additional I load a calendar and use mon as key. In my listbox I have twice month. One can be selected with values in my charts and the second month has no value. I need the second calendar to have the compete year in my listbox.

Regards

Stefan

1 Solution

Accepted Solutions
kiranmanoharrode
Contributor III

Re: Problem with calendar

Dear Stefan,


Change your set conditons for Months as you want in MonthQuarter,

i.e. for Month make Mrz to Mar,

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='#.##0,00 €;-#.##0,00 €';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD.MM.YYYY';

SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez';

SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So';

Regards,

Kiran

7 Replies

Re: Problem with calendar

Here you load mon as a date, i.e. as a number that also has a textual presentation format.

LOAD date,

  Date(date, 'MMM') as mon,

  Date(date, 'YYYY') as fy,

...

In your second load you load mon as a text only value. That's why you see Okt twice, because in one case it's a data and in the other case it's a three letter string value. Try this instead:

LOAD date,

  text(month(date)) as mon,

  year(date) as fy,

...


talk is cheap, supply exceeds demand
Not applicable

Re: Problem with calendar

Change the Inline load statement whit this

MonthQuarter:

Noconcatenate Load * Inline [

Month1, MonthName, Quarter, mon

1, January, 2, Jan,

2, February, 2, Feb,

3, March, 2, Mrz,

4, April, 3, Apr,

5, May, 3, Mai,

6, June, 3, Jun,

7, July, 4, Jul,

8, August, 4, Aug,

9, September, 4, Sep,

10, October, 1, Okt,

11, November, 1, Nov,

12, December, 1, Dez]

;

Regards...

stefan_fischer
New Contributor II

Re: Problem with calendar

Hi,

that's great, but i have English and German month. I want to have the english one.

Re: Problem with calendar

Add this to Gysbert's comment:

in your SET statements, you're telling QlikView to use German abbreviations for your months but in your INLINE table you're listing English abbreviations. Won't work too well (sometimes it will, sometimes it won't...)

Best,

Peter

Re: Problem with calendar

Change the SET statement at the top of your script.

Not applicable

Re: Problem with calendar

Change with this:

MonthQuarter:

Noconcatenate Load * Inline [

Month1, MonthName, Quarter, mon, month

1, January, 2, Jan,Jan,

2, February, 2, Feb,Feb,

3, March, 2, Mrz,Mar,

4, April, 3, Apr,Apr,

5, May, 3, Mai,May,

6, June, 3, Jun,Jun,

7, July, 4, Jul,Jul,

8, August, 4, Aug,Aug,

9, September, 4, Sep,Sep,

10, October, 1, Okt,Oct,

11, November, 1, Nov,Nov,

12, December, 1, Dez,Dec]

;

kiranmanoharrode
Contributor III

Re: Problem with calendar

Dear Stefan,


Change your set conditons for Months as you want in MonthQuarter,

i.e. for Month make Mrz to Mar,

SET ThousandSep='.';

SET DecimalSep=',';

SET MoneyThousandSep='.';

SET MoneyDecimalSep=',';

SET MoneyFormat='#.##0,00 €;-#.##0,00 €';

SET TimeFormat='hh:mm:ss';

SET DateFormat='DD.MM.YYYY';

SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';

SET MonthNames='Jan;Feb;Mrz;Apr;Mai;Jun;Jul;Aug;Sep;Okt;Nov;Dez';

SET DayNames='Mo;Di;Mi;Do;Fr;Sa;So';

Regards,

Kiran

Community Browser