Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amit_saini
Master III
Master III

Month-Year Script help!

Hi Folks,

Always want to show only last 12 months based on below expression in list box:

=Month ([GSE by KT plant.Month]) & '-' & Year ([GSE by KT plant.Month])

Please suggest ???

Thanks,

AS

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Aggr(if([GSE by KT plant.Month]>='$(=Max([GSE by KT plant.Month],10))', [GSE by KT plant.Month]),[GSE by KT plant.Month])

View solution in original post

17 Replies
Anonymous
Not applicable

why you are doing this: =Month ([GSE by KT plant.Month]) & '-' & Year ([GSE by KT plant.Month])??

Instead of this use monthname(DateField) at script, you will get same result....

see this:

Show rolling 12 Months only for last 12 months.

senpradip007
Specialist III
Specialist III

Why do you not use MonthYear() function?

amit_saini
Master III
Master III
Author

To get Month and Year from [GSE by KT plant.Month]

Actually we are not having any date field for this application

Thanks,
AS

Kushal_Chawda

what is values in [GSE by KT plant.Month] field?

amit_saini
Master III
Master III
Author

Thanks,
AS

its_anandrjs

Use Makedate or monthname function if you have only Year or month field like

=MonthName(MakeDate(Year([GSE by KT plant.Month]),Month([GSE by KT plant.Month])))

And try

=Monthname( Addmonths(MonthName(MakeDate(Year([GSE by KT plant.Month]),Month([GSE by KT plant.Month]))),-12))

Regards

Anand

amit_saini
Master III
Master III
Author

Hi Anand,

=Monthname( Addmonths(MonthName(MakeDate(Year([GSE by KT plant.Month]),Month([GSE by KT plant.Month]))),-12))

This one is not working!

Thanks,
AS

amit_saini
Master III
Master III
Author

Just want to show Nov 2014 till  Oct 2015 inside list box from the above example.

Thanks

AS