Help

Re: How to sum up two values and create an array?

Solved
Jump to Solution
2063 1
cancel
Showing results for 
Search instead for 
Did you mean: 
micha281sth
6 - Interface Innovator
6 - Interface Innovator

Hello, 

I am looking for a way to do something like this: 
I do have two values. I want to sum up these tweo numbers and create 3 more results. 

I.e. the value of field "first field" is 70, the value of field "second field" is 10.

The result should be the sum of both values but with 9 more calculated numbers: i.e. 80 / 90 / 100 / 110 / 120 / 130 / 140 etc. (So I need a total of 10 numbers in the result. And all numbers should be separated with a slash and a space before and after the slash). 

How is this possible with a formula? 

Thanks for help,
Michael

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto
CONCATENATE( 
  ({field1} + {field2}) & " / ",
  ({field1} + (2 * {field2})) & " / ",
  ({field1} + (3 * {field2})) & " / ",
  ({field1} + (4 * {field2}))
)

But note that this does not produce a true array. It produces a text string that looks like a list of items.

See Solution in Thread

4 Replies 4
Stephen_Orr1
10 - Mercury
10 - Mercury
 
You can do so by wrapping your field calculations in parenthesis () and then combining these with text like:

 

({first field} + {second field}) & ' / ' & ({third field} + {fourth field}) & ' / ' & ...

 

Hope that helps!
-Stephen

Hi @Stephen_Orr1 , 

thanks for the formula. But I do only have the first field and second field. The third and fourth field is being calculated (the result plus 10 / the new result plus 10 / etc.). 

I.e.: 70 + 10 = 80 + 10 = 90 + 10

Do you know what I mean? 

Thanks again, 
Michael

kuovonne
18 - Pluto
18 - Pluto
CONCATENATE( 
  ({field1} + {field2}) & " / ",
  ({field1} + (2 * {field2})) & " / ",
  ({field1} + (3 * {field2})) & " / ",
  ({field1} + (4 * {field2}))
)

But note that this does not produce a true array. It produces a text string that looks like a list of items.

micha281sth
6 - Interface Innovator
6 - Interface Innovator

Hello @kuovonne thanks a lot. 

Unfortunately I got an error and I guess it is because {field2} is a formula field (although it outputs a number). 

Field2 has this formula and I guess I have to convert the result to a number somehow: IF({Length} = '1 Year', '6', IF({Length} = '2 Years', '12')))

M.

---
UPDATE: 
I converted the result of the formula in Field2 to a number and it did work then 😀. Thanks @kuovonne