View Full Version : Constraint formula error

04-06-2008, 10:41 PM
i'm trying to define a simple business column with a MQL constraint formula but something seems to go wrong. The formula is just a boolean check such as


As far as i know this should select only the values above 10. When using this column in Ad-hoc reporting i get null values ('-') and no error.
I use Metadata Editor and Pentaho BI Platform I don't know if i'm missing something or this is just not working right (formulas are a recent feature).

I'd also like to know if there is a way to do a mapping between values within a column and new defined ones. For example, turn numerical values (0,1,2..) into descriptive strings ("Sales Department"...). I tried with CASE formula but i got a similar error.


04-07-2008, 03:38 AM
Buenos d

04-07-2008, 09:00 PM
Thanks for the feedback Matt! I finally solved the problem.

Apparently boolean expressions must also follow the syntax FUNCTION_NAME ( PARAM ; PARAM ), not the infix version. i'm not sure about this, since there is an infix example in the wiki but that's how i got it right.

I'm also trying to use the NOW function both as an MQL constraint and as a calculated formula for a new defined column. Always get a syntax or parse error...
My final goal is to add a constraint over dates to accept only "today" values. I'm using the syntax "NOW()".


04-08-2008, 03:43 AM
I tried the now() issue: just create a new physical column:

Name: Now
Formula: NOW()
Is exact? : true
Aggregation: none
Data type: Date

Now you can use that in expression.

Let me know if you meant something else.