Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
17 Replies
Kushal_Chawda
MVP
MVP

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
Champion III
Champion III

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

Regards

Anand

tresB
Champion III
Champion III

=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,

tresB
Champion III
Champion III

=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

tresB
Champion III
Champion III

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