Custom Charts - how to query only last 6 months of data?

kani1
Kilo Contributor

Hi,

I have a custom report created   which shows the report sine the beginning. I want to modify this to show only last 6 months of data. Is there a way to do this? Please help me.

1 ACCEPTED SOLUTION

If you are using SummaryTableWriter to query data, try using encoded string as below.



opened.setQuery("opened_at>javascript:gs.daysAgoEnd(30)");


View solution in original post

11 REPLIES 11

If you are using SummaryTableWriter to query data, try using encoded string as below.



opened.setQuery("opened_at>javascript:gs.daysAgoEnd(30)");


rcm
Kilo Contributor

Thanks - I added that to the Open and Closed Generators.



Do you also know if there is a way to filter on other variables - i.e. only client x / y and z ?


I assume it will be something like



opened.setQuery("company=COMPANYNAME").orsetQuery("company=COMPANYNAME");


rcm
Kilo Contributor

Ok so have managed to get it working for one company by using


closed.setQuery("company.nameSTARTSWITHname")



where name is replaced with the company name but cannot get that to work with something like



closed.setQuery("company.nameSTARTSWITHname").addOrCondition("company.nameSTARTSWITHname2");


How about ...



closed.setQuery("company.nameSTARTSWITHname^ORcompany.nameSTARTSWITHname2");


rcm
Kilo Contributor

Ajit - In I can now get this working by filtering on the last 70 days (say) - or by company names



BUT for some reason I cannot get a combination of the two - I'm trying



opened.setQuery("opened_at>javascript:gs.daysAgoEnd(70)^ANDcompany.nameSTARTSWITHname1^ORcompany.nameSTARTSWITHname2^ORcompany.nameSTARTSWITHname3");



This is showing the correct timescale but still showing all incidents



do you know how I can combine the two



Thanks