Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

17 Replies
Kushal_Chawda

create the MonthYear Field as

monthname(date#([GSE by KT plant.Month],'MM-YY')) as MonthYear.

Now using this month year you will be able to do the set analysis

its_anandrjs

Share any sample file only date field in which you have problem.

Regards

Anand

tresesco
MVP
MVP

=Aggr(If(Date#(MonthYear, 'DD-YY')>=$(=Max(Date#(MonthYear, 'DD-YY'),10)), MonthYear),MonthYear)

Change the fieldname to yours.

amit_saini
Master III
Master III
Author

PFA,

tresesco
MVP
MVP

=Aggr(If(Date#(Month_Year, 'MMM YYYY')>=$(=Max(Date#(Month_Year, 'MMM YYYY'),10)), Month_Year),Month_Year)

amit_saini
Master III
Master III
Author

Not idea why it's not working here.

Plz see the attachment.

Thanks,
AS

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])

amit_saini
Master III
Master III
Author

Thanks a lot