Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field like INV_DATE in my data model and my requirement is to create three button objects.
Button 1: If I click it should filter last 6 months data (ex: today is 7th June, I am supposed to get Dec 2013 to May 2014)
Button 2: If I click it should filter last 1 year data (ex: today is 7th June, I am supposed to get June 2013 to May 2014)
Button 3: I should be able to pick as my wish like FROM to TO. It may be not a button, looking for other solution.
Is it possible to implement using only one INV_DATE filed?
Thanks,
Button 1 and 2 can be implemented with buttons. You can add Select in Field actions to the button to apply the selection in the field INV_DATE.
Button 3 is easiest done with a slider object.
See attached example.
Unfortunately I have personal edition, pls copy script here. My guessing was right for 1 &2.
Thanks,
Here are the two search strings for the Select in Field actions for the two buttons
Search string for last six months:
='>' & num(addmonths(today(),-6)) & '<=' & num(today())
Search string for last year:
='>' & num(addyears(today(),-1)) & '<=' & num(today())
Note, make sure that your data field contains dates and not string values. Use the date# function if necessary in the script to make date values from string values.
Hi,
I created a BUTTON with the name of Last 6 months, in Action tab Added SELECT in FIELD
In Field: INV_DATE
In search string: ='>' & num(addmonths(today(),-6)) & '<=' & num(today())
I guess before that I should clear all Date field selections. I did as in Action Clear Other Fields in Filed I have selected date fields.
But above code is not working and I suppose to get Dec 2013 to May 2013 as I mentioned in the first post.
Like the same way for Last 1 year too.
Thanks,
Try ='>=' & num(monthstart(today(),-7)) & '<' & num(monthstart(today()))
I tried with this
='>=' & monthstart(today(),-6) & '<' & monthend(Date(today()),-1)
But button is not responding.
Thanks,
Pls let me know where I am doing wrong.
Thanks,
HEy,
Cann't we do like this :
Sum({<Date = {">= $(=addmonths(today(),-6))"}>}Sales) ??