Skip to main content
Question

Using a calculation in another field


Forum|alt.badge.img

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

redgeographics
Celebrity
Forum|alt.badge.img+50

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?


Forum|alt.badge.img
  • Author
  • August 15, 2019

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

 

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


ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • August 15, 2019
sam2130 wrote:

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


Forum|alt.badge.img
  • Author
  • August 16, 2019
ebygomm wrote:

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 :)


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings