BusinessObjects Board

Variable using Last Months revenue

I have a prompt that when the user enters a date, it brings back 2 months worth of data. Thus when a user enters in 10/1/2004, it will also bring back 9/1/2004 data.
Now I am trying to show the revenue in calculations based off the month that was entered. My problem is if i try and use the userresponce variable or Max(date) in report, i can not use them in my where clause.
= where ( = Userresponce)
BO says you an not do it.

What makes it hard is I got it to work, but then when I use it in calculations combined with rand it does not work.
The table I want to use would look somthing like

ID Previous Current Total % of
Num Revenue Revenue Revenue All
1 400 50 450 30%
2 150 25 175 8%
3 50 75 125 4%
4 25 100 125 4%
5 50 50 100 2%

I am kind of lost on where to go now, i have been just trying things at will to see if they work.
Thank you

Zac Adam :us: (BOB member since 2002-11-12)

Have you tried using flags to resolve this issue?

<Current Month Flag>:= If(<Date> = Userresponse(DataProvider(<SomeVar>,"Month?")) Then 1 Else 0

<This Month's Revenue>:= <Revenue> Where <Current Month Flag> = "1"


csurguine :us: (BOB member since 2005-01-04)

Yes I have tried that, then I get a computation error. And if i say Max date then when I bring in revenue i will be bringing it for both, since the max date would be equal

Zac Adam :us: (BOB member since 2002-11-12)

This article should explain why this doesn’t work.

As for the computation error, make sure all the dimension objects required to calculate the measure are in the report. Computation errors occur when a dimension used to calculate a measure is missing.

Can you be more specific as to what the error message is or what is happening when you try to perform the calculations?

csurguine :us: (BOB member since 2005-01-04)