10 Replies Latest reply: Apr 26, 2012 3:10 PM by Steve Dark

Set Analysis - Last 3 Months of Last Year

Here is my current syntax that is not working.

=sum({\$<Year={\$(=Max(Year)-1)}, MonthID = {">\$(#=max(MonthID)-3) <=\$(#=max(MonthID))"}> }Cnt)

What am I doing wrong?

• Set Analysis - Last 3 Months of Last Year

here's a pointer: Last 3 months will always be specific - like Oct, Nov & Dec if you're using Calendar year....if you're using Fiscal year, then whatever are the last 3 months according to your FY. So you could be more specific with the months or MonthIDs in the set exp above.

• Set Analysis - Last 3 Months of Last Year

I would like the expression to grab the last 3 months from the current date. Then they would be able to select April, and get Feb, March, April. MonthID's 1,2,3.

Is that what your looking for?

• Set Analysis - Last 3 Months of Last Year

=sum({\$<Year={"\$(=Max(Year)-1)"}, MonthID = {">\$(=max({<Year={"\$(=Max(Year)-1)"}>} MonthID)-3) <=\$(=max({<Year={"\$(=Max(Year)-1)"}>} MonthID))"}> }Cnt)

Kiran.

• Set Analysis - Last 3 Months of Last Year

So that value that is close, but it off just a little bit. It looks like it is a date issue.

But its a good start, thanks.

• Set Analysis - Last 3 Months of Last Year

Also, this works fine with no selections, but say I select April. I would like to see that last 90 days from that point. How would the expression need to be changed for that scenario?

• Set Analysis - Last 3 Months of Last Year

=sum({\$<Date={"<=\$(=Max(Date)-90)"}} Cnt). Hoping you have a date fields on which you created calender fields.

Kiran

• Set Analysis - Last 3 Months of Last Year

This expression does not work for me.....

• Re: Set Analysis - Last 3 Months of Last Year

Try this:

• Set Analysis - Last 3 Months of Last Year

Also, I forgot to add this titbit.

This is a variable I'm using for current year rolling 3 months.

This is the expression I'm using

=sum(\$(vSetRolling3)Cnt)

Let vSetRolling3 = '{\$<MonthID = {">=' & Chr(36) & '(=Max(MonthID) - 2)<=' & Chr(36) & '(=Max(MonthID))"},' & Chr(10) &

'Date = ,' & Chr(10) &

'Year = ,' & Chr(10) &

'Quarter = ,' & Chr(10) &

'Period = ,' & Chr(10) &

'[Period (#)] = ,' & Chr(10) &

'Month = >}';

But I couldn't figure out how to drop the variable into the expression to make it last year. I'm sorry that I forgot to add this earlier.