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 get all months list >= current month

Hi All,

I want to display months in a list box.Month names should be greater than and equal to current month.

Ex: current month=mar

so i want mar,apr,may,june,...dec

Thank you

Regards,

Prajna

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Then try like:

=If( Month(Date#(MonthField, 'MMM'))>=Month(Today()), MonthField)

View solution in original post

9 Replies
sunilkumarqv
Specialist II
Specialist II

Hi Prajna

Go list box end make an experssion below so you get all month which greter than are equal to mar .

=if(Month>='Mar',Month)

Hope you get the solution

sunilkumarqv
Specialist II
Specialist II

Try this

see attached

tresesco
MVP
MVP

Assuming that you have a field MonthField created in the script using monht() function, you can try the list box expression like:

=If(MonthField>=Month(Today()), MonthField)

MK_QSL
MVP
MVP

How's your Month dimension is formatted?

jsingh71
Partner - Specialist
Partner - Specialist

Hi Prajana,

You need to put expression in list box. Find attachment for your reference.

Not applicable
Author

hi,

I haad already tried this..but problem i faced is em not getting months whocse letter is less than m

like apr,dec...

Can u tell me what the prob?

I have a date field from there i have got month field using datename function...is it coz of thuis method?

what can i use to get monthnames from date field?

Thank you

Reagrds,

Prajna

Not applicable
Author

Hi,

select left(datename(mm,"START_DATE"),3)as 'Production month'  from tablename

I have rerreived in this fashion.

Thank you

ReGARDS,

pRAJNA

sunilkumarqv
Specialist II
Specialist II

Because you driven month from Date in you data .but actually Month which defind in If condition it not considering your data its refering qlikview month

So see attached

Try to change Month you you can create ID

=if(ID>= Num(MonthData(Now())),MonthData)

tresesco
MVP
MVP

Then try like:

=If( Month(Date#(MonthField, 'MMM'))>=Month(Today()), MonthField)