BusinessObjects Board

Problem with a Variable

Hi,

I’m facing a problem where I using this formula :

Where (=)

The “Actual Month” is variable I created and it holds this Formula =Max() where is a number

What’s going wrong ???

Does someone faced the same problem ?

Thanks for your responses


Arcondo (BOB member since 2004-11-08)

You cannot put a where condition on a measure. Try with this

If(<Month>=<Actual Month>) then <Profit>

Let us know if this too doesn’t work.


venira :india: (BOB member since 2004-12-07)

Thanks a lot for your help. I follow your suggestion and now I have #computation error ???


Arcondo (BOB member since 2004-11-08)

Your explaination makes me to guess that all the objects are measures.anyway, can you let me know the object type of month,actual month and profit.


venira :india: (BOB member since 2004-12-07)

All are numbers. (ex: feb 2005 = 200502)


Arcondo (BOB member since 2004-11-08)

sorry to ask you again…i wanted the object type in BO but not the data type of the field in the data base.


venira :india: (BOB member since 2004-12-07)

If all the objects are measures, you cannot acieve it as we cannot putconditios on aggregated measures.


venira :india: (BOB member since 2004-12-07)

I understand you. In fact my query retreive me several Months and I need to choose the profit according to a specific month.

Do you have any idea how we can acheive that.

Thanks.


Arcondo (BOB member since 2004-11-08)

The answer is in this FAQ entry.


Dwayne Hoffpauir :us: (BOB member since 2002-09-19)

Thanks Dwayne for your reply.

But still don’t solve my probs. I’m agree with you when in the Flag Object it looks like : (=Constant) where is numeric

In fact, I’m using (=Max()), then the flag is considered as measure. As far as I know there is no way to put it in the clause “Where” without ending with DMB0007

Do you have any other workaround ?

Thanks in advance.


Arcondo (BOB member since 2004-11-08)

I’m not sure you’re using the flag object correctly. Define a variable (say, ) with the following formula:

= If <Month> = Max(<Month>) In Report Then "Y" Else "N"

Now your primary formula would be:

= <Profit> Where (<Month Flag> = "Y")

Dwayne Hoffpauir :us: (BOB member since 2002-09-19)