Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to create month and year list box?

Hi,

I am VERY new to Qlikview and can't seem to find figure out how to build a list box that ONLY shows "Month" and another box that should "Year".

For example,

My field records for date column are:

2/01/2009

2/14/2009

3/12/2009

4/15/2009

1/10/2010

2/23/2010

3/02/2010

How do I create a list box that ONLY shows "YEAR" such as only 2009, 2010?

How do I create a list box that ONLY shows "Month" such as Jan, Feb, Mar, April?

Thanks in advance!!!!

13 Replies
Not applicable
Author

Hi,

use the Datefunctions like Year(Date), Month(Date). Refer to your Manual/Help for details like formatting

Not applicable
Author

Hi,

In addition to the answer above, think about creating the Year and others fields during load. So you will have them present in the whole application

Like


Load .....
Year(Date) AS MyYear,
Month(Date) AS MyMonth,
......


Enjoy QV !

Not applicable
Author

Thank you so much for responding!. Perhaps its an oversight on my end but I've been searching through the manual and can't seem to find it the exact expression script on how to format it.

Sorry for asking such basic questions!

Not applicable
Author

The problem is, I dont have two separate columns such as
"Month" or "Year". Otherwise, it would be very easy to create the box for it.

The date column consist of month,day and year "02/22/2010"

Kali

Not applicable
Author

Hi,

no problem. There are no silly questions. Don't hesitate to ask again.

And tell me, if you had success Big Smile

regards

Roland

Not applicable
Author

OK,

create a new listbox, look at the drop down where you can choose the field to display. There a first entry called <expression> Choose it and the expression editor will open. Then use "=Year(Date)". That works.

Not applicable
Author

Hi,

and another addition. look at the sample qvw.

Regards

Roland

Not applicable
Author

Hi Roland,

I can't seem to open your sample qvw document because I am only running the free personal edition.

By the way, I did try running your script but its still showing all the date rows.

I want to be able to create a list box that only shows the date once:

Year: 2009

2010

AND NOT:

2009

2009

2009

2009

2010

2010

2010

Thanks again!

Not applicable
Author

OK,

can you post a sample qvw. I will comment it. I have a normal User Licence. That should work.