Skip to main content
Question

Using a calculation in another field

  • August 15, 2019
  • 4 replies
  • 129 views

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.

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+60
  • Celebrity
  • 3701 replies
  • August 15, 2019

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
  • 2 replies
  • 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+44
  • Influencer
  • 3427 replies
  • 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.

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
  • 2 replies
  • August 16, 2019

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