Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
durgabhavani
Creator III
Creator III

help me to create months based on my date in dashboard?

Hi All,

Help me to create months-year based on my date in dashboard. My date is like below.

Date

14032018

Expected Output:

Jan-18

Feb-18

Mar-18

Apr-18

May-18

Jun-18

Jul-18

Aug-18

Sep-18

Oct-18

Nov-18

Dec-18

Thanks,

Durga

1 Solution

Accepted Solutions
sunny_talwar

May be this

Table:

LOAD Date(AddMonths(YearStart(Today()), IterNo() - 1), 'MMM-YY') as MonthYear

AutoGenerate 1

While IterNo() <= 12;

View solution in original post

13 Replies
sunny_talwar

May be this

Date(MonthStart(Date#(Date, 'DDMMYYYY')), 'MMM-YY') as MonthYear

Colin-Albert

Monthname will give a similar output except the year is YYYY not YY

    

MonthName(Date#(YourDateField, 'DDMMYYYY')) as MonthYear

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...

durgabhavani
Creator III
Creator III
Author

Sunny my field Date is variable. Also please note that i need to write this in backend.

Sorry to missed to mention earlier.

sunny_talwar

I think my above response covers both the things you mentioned

durgabhavani
Creator III
Creator III
Author

Colin my field Date is variable. Also please note that i need to write this in backend.

durgabhavani
Creator III
Creator III
Author

I am not able to get the expected output. Can you please provide sample file.

Chanty4u
MVP
MVP

please provide your sample data ?

Chanty4u
MVP
MVP

try this sample

A:

load *,

Date(MonthStart(Date#(mydate, 'DDMMYYYY')), 'MMM-YY') as MonthYear;

LOAD * INLINE [

    rate, test, mydate

    1ssues, failed, 14032018

    issues, incom, 15032018

    NumDay, test, 16032018

    NumDay, fsr, 17032018

];

durgabhavani
Creator III
Creator III
Author

Hi All,

Everyone saying the solution to get the output like below:

Mar-18

But I am expecting the output like below.

Expected Output:

Jan-18

Feb-18

Mar-18

Apr-18

May-18

Jun-18

Jul-18

Aug-18

Sep-18

Oct-18

Nov-18

Dec-18