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

Splitting the Date list box into Month and Year

Hello Fellow QV users

Can i ask for your help in splitting my Date list box into two other list boxes i.e Year and Month retaining the Date list box as is?

my script so far looks like this:

SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';

SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';

LOAD Date,

     [VXD1#1 Messages],

     [VXD1#1 Requests],

     [VXD1#1 Answers],

     [VXD1#2 Messages],

     [VXD1#2 Requests],

     [VXD1#2 Answers],

     [NND1 #1 Messages],

     [NND1 #1 Requests],

     [NND1 #1 Answers],

     [NND1 #2 Messages],

     [NND1 #2 Requests],

     [NND1 #2 Answers],

     [Daily Peak] as Total,

     O,

     P

FROM

(ooxml, embedded labels, table is [TPS Data]);

Screen Shot 04-20-15 at 12.35 PM.JPG

1 Solution

Accepted Solutions
ziadm
Specialist
Specialist

Hi Ravi

If i got you right you want to have the Month and Year of the Date Field loaded.

if this is the case use the Month & Year Functions

Load Date,

Month(Date) as Month,

Year(Date) as Year;

or you may use it as expression in your Table as having a new expression with Month(Date) and Year(Date)

Regards

Ziad

View solution in original post

2 Replies
ziadm
Specialist
Specialist

Hi Ravi

If i got you right you want to have the Month and Year of the Date Field loaded.

if this is the case use the Month & Year Functions

Load Date,

Month(Date) as Month,

Year(Date) as Year;

or you may use it as expression in your Table as having a new expression with Month(Date) and Year(Date)

Regards

Ziad

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD

*

Month(Date) AS Month,

Year(Date) AS Year

FROM DataSource;

Regards,

Jagan.