Skip to main content

Workbench ExcelPROBLEM 1

 

if in column TYP the value is PL 

than do nothing (keep the cell G1, H1, I1 empty) 

********************************************

 

PROBLEM 2

 

if in column TYP the value is PE

than calculate value in "x1 in (m)" 

check condition "F is W" or "F is E" or F is S" 

here the condition is "F is W" so 

fill in default value from "Y in (m)" to "y1 in (mm)" and from "Z in (m)" to "z1 in (m)" 

 

 

FORMULA to calculate/obtain value in "x1 in (m)" i.e. 1960.85

 

from the DIM in (mm) always select the first value before "x" for i.e. 600 

and convert it from millimeter (mm) into meter (m) i.e. 600/1000 = 0.6 

now add the result i.e. "X in (m)" + "0.6"

 

********************************************

 

PROBLEM 3

 

if in column TYP the value is HO

than calculate value in "y1 in (m)" 

check condition "F is W" or "F is E" or F is S" 

here the condition is "F is E" so

fill in default value from "X in (m)" to "x1 in (mm)" and from "Z in (m)" to "z1 in (m)" 

 

 

FORMULA to calculate/ obtain value in "y1 in (m)" i.e. 5988.27

 

from the DIM in (mm) always select the first value before "x" for i.e. 500 

and convert it from millimeter (mm) into meter (m) i.e. 500/1000 = 0.5 

now add the result i.e. "Y in (m)" - " 0.5" 

 

********************************************

Hi @magi​ ,

Are you wanting FME to calculate the values using the provided formulas (i.e. in the workspace) or have the Excel formula calculate the value for you (i.e. G2 =LEFT(C2, FIND("x",C2)-1)? Both are options and you can use a combination of the two if that is the desired output.

If you want the workspace to calculate these values, you may want to review the Testing with If-Then Statements tutorial as it will inform you about conditional values which will come in handy here. Conditional values can be set in a variety of transformers, like the AttributeManager, which should help you get the output you are looking for. Aside, if you don't want to work with conditional values, there are a number of transformers that perform similar operations like the AttributeValueMapper, etc..

Either way, you can set equations or excel formulas based on attribute values and set default values for attributes if no conditions are met.


Reply