Pages: [1]
  Print  
Author Topic: Attribute Construction  (Read 1298 times)
Alexander
Guest
« on: March 02, 2009, 04:46:12 PM »

I would like to calculate a turnover figure. I have the sales quantity and two different price attributes. All three atrributes are numerical(real) attributes. Based on a nominal indicator (has two possible values: A or C) I would like to decide the appropriate formula.
Unfortunately the AttributeConstruction operator. I have entered if(indicator == A, salesquantity*price1,salesquantity*price2) is not working. I always get the message: Unrecognized symbol "V".
Any ideas?
Logged
Sebastian Land
Administrator
Hero Member
*****
Posts: 2426


« Reply #1 on: March 06, 2009, 11:12:42 AM »

Hi Alexander,
try using if(indicator == "A", salesquantity*price1,salesquantity*price2).

The operator info states:
Quote
Beside those operators and functions, this operator also supports the constants pi and e if this is indicated by the corresponding parameter (default: true). You can also use strings in formulas (for example in a conditioned if-formula) but the string values have to be enclosed in double quotes.

To read it, use the context menu in the operator tree or press F1.

Greetings,
  Sebastian
Logged
Pages: [1]
  Print  
 
Jump to: