BusinessObjects Board

Syntax Error

Can somone please tell me what the error is in this code. Sorry for posting dumb questions. Getting started. I get a syntax error.


=Sum(<Product Price>) Where ((<Product Type>=100) AND (<Product Price>>0))

Product Price is a Measure and Product Type is a dimension


ddsrini (BOB member since 2004-06-23)

Please, go the FAQ Reporter Forum and search for your Error code.

Andreas :de: (BOB member since 2002-06-20)

Agree, do a search, this subject is talked about. You can only have an equal in your where clause. Do a search there are work arounds.

Scott Bowers :us: (BOB member since 2002-09-30)


=Sum(If <Product Type> =100 AND <Product Price> > 0 Then <Product Price> Else 0)

Not sure why you are summing product prices before multiplying them by sales quantities, but hey, that’s your data to know, not mine! :smiley:

Could you please maybe make it a little more clear what this code is?

Is it the definition of an object from Designer? (If so, then this question belongs in the Designer Forum.)

Is it the SQL generated by a query panel? If so, then is numeric or alpha – because if it should be alphanumeric, the 100 should be in quotes. But if it is from the query panel, BusinessObjects should have taken care of it.

Or is it FreeHand SQL?

Finally, saying that your getting “an error” is not very helpful – please tell us what the error is.

Whatever it is, then you should be more explicit about what you’re doing, and not leave us guessing.

Anita Craig :us: (BOB member since 2002-06-17)

Ease up everyone. It’s just a question.

It’s happening in reporter. The problem is that the WHERE construct doesn’t allow for anything but = as an operator. It also doesn’t allow for anthing but a constant on the right side of the =. Your formula doesn’t fit that.

Perhaps you could use an if-then-else construct instead.

Steve Krandel :us: (BOB member since 2002-06-25)