Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have one requirement where date difference should be 1 year. like below example
Today is 8th Feb 2011. I want to create one button which should select 1 year difference like 1st Feb 2010 to 31st Jan 2011 so the difference is 1 year.
If I refresh the dashboard in coming month from 1st march 2011 to 31st March 2011 then the Data selection should be 1st March 2010 to 29th Feb 2011.
Could you pls let me know how to implement this requirement.
Thanks,
Hi,
you can use a lot of datefunctions:
Year(Datefield) and (Year(Datefield)-1)
Makedate(Year(Datefield),Month(Datefiled),Day(Datefield)) and
Makedate((Year(Datefield)-1),Month(Datefiled),Day(Datefield))
Create a button and put Action to select your Date field with following value expression:
='>' & addmonths(today(), -12) & ' <' & today()
This should select last 1 year dates, provided your Date field is actually a valid Date type content.
Hope this helps you.
Thanks Rakesh, but I am not sue how to proceed. I just created one button and under action tab I clicked on Add buttton here I have question what should I select and where I have to paste this formula?
But if I click on that button it should select 1 year difference data
Thanks,
Under Actions tab press "Add" button
Action type: Selection, Action: Select in Field, Press OK
In the field "Field" on the right, type the field name in your data model you want to select these days.
In the "Search String" field enter the expression I gave you: ='>' & addmonths(today(), -12) & ' <' & today()
Press OK and try the button.