How to add Next 30, 60, 90 days options to Interactive Filter?

Harry Smith
Giga Contributor

Hi Everyone,

 

I have setup an interactive filter which affects a report displaying device's warranty expiration dates, however I want it to be able to filter this report by devices that expire in the Next 30, 60, and 90 days. I have the option for Next Month so really it's just adding the 60 and 90 days filter, how can I do this?

 

Many Thanks,

 

Harry Smith

1 ACCEPTED SOLUTION

Harry Smith
Giga Contributor

Hi All, 

 

I've found the solution to my problem,

 

It requires editing the script in the BR "Get Date Filter Options for Date Filters" by adding the below lines:

 

answer.add('180_Next 3 months@javascript:gs.monthsAgoStart(-0)@javascript:gs.monthsAgoEnd(-3)', gs.getMessage('Next 3 months'));
             answer.add('185_Next 6 months@javascript:gs.monthsAgoStart(-0)@javascript:gs.monthsAgoEnd(-6)', gs.getMessage('Next 6 months'));
             answer.add('190_Next 9 months@javascript:gs.monthsAgoStart(-0)@javascript:gs.monthsAgoEnd(-9)', gs.getMessage('Next 9 months'));

 

Thanks everyone for you suggestions!

 

Cheers,

 

Harry Smith

 

 

View solution in original post

11 REPLIES 11

Hello Harry,

Can you please provide more info to understand the exact problem? 

If you are facing issue to create filters for 60 & 90 days then you can create filter like i have mentioned above by changing days from 30 to 60/90.

or, you want to create some kind of dynamic interactive filter?

Thanks

Deepen Shah

aavenir.com

Muralidharan BS
Mega Sage
Mega Sage

HI Harry,

You can achieve this in Performance analytics, create three indicator with different dates and add it to a time series widget, in the widget in dashboard you will see option to choose the dates something like below.

 

find_real_file.png

Kindly mark my response correct and helpful if my suggestion helped you,


Thanks

Murali

Harry Smith
Giga Contributor

Hi All, 

 

I've found the solution to my problem,

 

It requires editing the script in the BR "Get Date Filter Options for Date Filters" by adding the below lines:

 

answer.add('180_Next 3 months@javascript:gs.monthsAgoStart(-0)@javascript:gs.monthsAgoEnd(-3)', gs.getMessage('Next 3 months'));
             answer.add('185_Next 6 months@javascript:gs.monthsAgoStart(-0)@javascript:gs.monthsAgoEnd(-6)', gs.getMessage('Next 6 months'));
             answer.add('190_Next 9 months@javascript:gs.monthsAgoStart(-0)@javascript:gs.monthsAgoEnd(-9)', gs.getMessage('Next 9 months'));

 

Thanks everyone for you suggestions!

 

Cheers,

 

Harry Smith

 

 

Hi Harry,

This was the same requirement for our client as well.

After I edit the BR, still I am unable to see the options Next 3months, 6months and 9months from the reports.

Please help on this

but does it work the exact way?