Solved

Math operations between values in the same column


Dear all,

I hope you can help to solve this question. I need to calculate Length ranges and I have as data class and Length. Can you help me please?

Class Length Lenght-ranges

A-1 100 100

A-2 250 (100-250) = 50

A-3 300 (250-300) =50

B-1 10 10

B-2 30 20

B-3 80 50

C-1 40 40

C-2 100 60

C-3 200 100

icon

Best answer by oscard 8 April 2019, 12:23

View original

4 replies

Userlevel 2
Badge +19

First, I would use a StringReplacer to remove the spaces around the character "=". The goal is getting:

A-1 100 100

A-2 250 (100-250)=50

A-3 300 (250-300)=50

B-1 10 10

B-2 30 20

B-3 80 50

C-1 40 40

C-2 100 60

C-3 200 100

Then I would use AttributeSplitter using a blank space " " as the character used for splitting. That way you will get a list with 3 elements in every feature:

_list{0} --> Class

_list{1} --> Length

_list{2} --> Range

Sorry, I was not clear. Length-ranges (column in yellow) it is what I want to get. I have only class and Length.

sampledata.xlsx

 

 

Userlevel 2
Badge +19

I think now I do understand what you need.

 

You need to use AttributeManager enabling adjacent features:

 

 

And then create the Range attribute with a conditional value:

 

xlsxr2none.fmw

I think now I do understand what you need.

 

You need to use AttributeManager enabling adjacent features:

 

 

And then create the Range attribute with a conditional value:

 

xlsxr2none.fmw

Thanks, it worked.

Reply