Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Creating a 12 month calendar from a list of dates

I originally had an issue with single dates to a month but next problem!

Now you can see I have a list of one month many times. I want my end result to be a calendar, ie select July and my stats now show all July as a whole month and not just one day.

list of months.PNG

Tags (4)
1 Solution

Accepted Solutions
Highlighted

Re: Creating a 12 month calendar from a list of dates

Hi,

What is your expresssion for Year??

if you are using YEAR([Activity.Completed Date])

then write if(match(YEAR([Activity.Completed Date]),'2014','2015','2016'),Year)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

9 Replies
Highlighted
Master II
Master II

Re: Creating a 12 month calendar from a list of dates

Looks as if you have only formatted the date.

Please use a function like

MONTHNAME(MyDate)     AS MyMonth

This field will show each occurance only once, thus being selectable

HTH Peter

Highlighted

Re: Creating a 12 month calendar from a list of dates

Hi

try with

Date(MonthStart(DateField,'MMMM'))

or

MonthName(Monthstart(DateField))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
Creator III
Creator III

Re: Creating a 12 month calendar from a list of dates

Hi Peter / max,

That worked a charm. I now have the month and the year in the same text box, I would like this separated and to lose the year. See image below for expression

month and year.PNG

Highlighted
Master II
Master II

Re: Creating a 12 month calendar from a list of dates

Have a look into the DATE-functions in the OL-Help:

MONTH([Activity.Completed Date])     AS Month

YEAR([Activity.Completed Date])        AS Year

should deliver the results

Peter

Highlighted
Creator III
Creator III

Re: Creating a 12 month calendar from a list of dates

Hi Peter,

Many thanks for reply. I will certainly check it out. Is it possible to list the months as Jan Feb Mar instead of alphabetically?

Thanks again

Highlighted

Re: Creating a 12 month calendar from a list of dates

Hi,

Yes it is possible,

Go to property->sort->

try with Numeric->Ascending

or

with Expression->match(FieldName,'Jan','Feb','Mar')

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Highlighted
Creator III
Creator III

Re: Creating a 12 month calendar from a list of dates

Lads, thank you so much.

I have a whole bunch of years list and only want 2014,2015 & 2016. How do I exlcude the others?

year.PNG

Highlighted

Re: Creating a 12 month calendar from a list of dates

Hi,

What is your expresssion for Year??

if you are using YEAR([Activity.Completed Date])

then write if(match(YEAR([Activity.Completed Date]),'2014','2015','2016'),Year)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.

View solution in original post

Highlighted
Creator III
Creator III

Re: Creating a 12 month calendar from a list of dates

Thank you.