Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Want to display for the last 6 months

Hi everyone,

I have a field called CR created date, out of which I am creating the field month at the script level by using

date(monthstart([CR Created Date]),'MMM YYYY') as month,

this is giving me month as ex: sep 2013,

now out of this month field I want to display only last 6 months data which starting august 2013 till jan 2014, this month field is my dimension and my expression sums budget.

Could you please provide inputs on how to get only 6 months data?

4 Replies
Nicole-Smith

sum({<month={'>=monthstart(addmonths(today(),-6))'}>}Budget)

Not applicable
Author

I have tried this , it dint help my data dont display at all, i tried inserting the same expression in the text object to test , it is showing me august

Nicole-Smith

I missed the dollar sign expansion:

sum({<month={'>=$(=monthstart(addmonths(today(),-6)))'}>}Budget)

If that doesn't work, please post a sample file.

Not applicable
Author

=Sum({$<Date = {"<=$(=Max(Date)) >=$(=Date(AddMonths(Max(  Calendar_Date), - 6))) "},

Month=,Year= >} Budget)

dimension = month

use this expression on  budget.