Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
knightwriter
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

1 Solution

Accepted Solutions
PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

9 Replies
prieper
Master II
Master II

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

PrashantSangle

Hi

try with

Date(MonthStart(DateField,'MMMM'))

or

MonthName(Monthstart(DateField))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
knightwriter
Creator III
Creator III
Author

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

prieper
Master II
Master II

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

knightwriter
Creator III
Creator III
Author

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

PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
knightwriter
Creator III
Creator III
Author

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

PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
knightwriter
Creator III
Creator III
Author

Thank you.