Map and Table Calculation

Predefined variable %K

Variable to calculate with the class names or IDs of the domain of a table.

Syntax

%K

Notes:

Tip:

When the definition symbol = is used, a dependent output column is created; when the assignment symbol := is used, the dependency link is immediately broken after the output column has been calculated.

Usable in

TabCalc

Examples

TabCalc example:

OutCol1 = %K

OutCol2 = NAME(%K)

OutCol3 = CODE(%K)

OutCol4 = IFF(%K="Vacant",0,Population)

OutCol5{dom=value;vr=0:1000:1}:=?

OutCol5["Vacant"]:=0

OutCol5["Residential"]:=500

 

Domain

Population

OutCol1

OutCol2

OutCol3

OutCol4

OutCol5

Vacant

100

Vacant

Vacant

V

0

0

Residential

500

Residential

Residential

R

500

500

Industrial

250

Industrial

Industrial

D

250

?

Institutional

50

Institutional

Institutional

S

50

?

  

TabCalc example using two different tables:

Suppose we have a table Province that contains information about the amount of products available in provinces. Further, we have a table ProductPrice with product prices. To obtain the yield of wood per province, multiply column Wood in table Landuse with the cell containing the wood price in column Price of table ProductPrice.

WoodPrice = ProductPrice.Price["Wood"] * Province.Wood

Province.tbt

ProductPrice.tbt

Dom.
Province


Wood


Fodder

Dom.
Product


Price

Province1

100

150

Wood

10

Province2

200

600

Fodder

30

Province3

500

50

...

...

Province4

400

75

Province5

200

100

...

...

...

 

Province.tbt

Dom.
Province


Wood


Fodder


WoodPrice

Province1

100

150

1000

Province2

200

600

2000

Province3

500

50

5000

Province4

400

75

4000

Province5

200

100

2000

...

...

...

...

Note:

When using data from different tables all table names have to be fully specified in the TabCalc expression.

See also: