Question

Using a calculation in another field

  • 15 August 2019
  • 4 replies
  • 33 views

Badge

Hi,

 

I have a set of data, with dates ranging from 2005 to 2019. I use the interval feature in the Date Time Calculator, and am able to calculate the interval between the two dates (14 years).

 

In another table, I have a number of jobs grouped, and I want to use the 14 years calculation to determine the number of jobs per year. (silly example given below)

 

Fruit

 

Total Fruit

 

Fruit per year (ie, total / 14)

 

Apples

 

20

 

1.43

 

Bananas

 

30

 

2.14

 

Cherries

 

40

 

2.85

 

 

So I want to get the "Total Fruit" and divide it by my _results_interval. But it wont work. I try to use Attribute Manager, and then bring in the _results_interval, but it displays it as a new row. And wont let me bring it into the arithmetic calculator either.

 


4 replies

Userlevel 5
Badge +25

It should work. The _results_interval will be present as a new row on all features and you should be able to use it in the Arithmetic editor. Can you share a screenshot of how you've set up your AttributeManager?

Badge

I solved it. I used feature Merger. Its clunkly, but works.

 

Couldn't get the Attribute Manager to work for the life of me.

Userlevel 1
Badge +21

I solved it. I used feature Merger. Its clunkly, but works.

 

Couldn't get the Attribute Manager to work for the life of me.

If the attributes you need for the calculation are in two different tables and therefore two different features you cannot perform a calculation with them without joining them in some way. Arithmetic operations operate on a single feature so both values must be present on the same feature to be used in a calculation.

 

It sounds like you have achieved this with a FeatureMerger

Badge

If the attributes you need for the calculation are in two different tables and therefore two different features you cannot perform a calculation with them without joining them in some way. Arithmetic operations operate on a single feature so both values must be present on the same feature to be used in a calculation.

 

It sounds like you have achieved this with a FeatureMerger

Yeah, after many attempts and a few swear words, I got there.

 

Thanks :)

Reply