9 Replies Latest reply on Oct 29, 2018 12:30 AM by Henrik Omdal

# If larger then X, then SUM / merge

Hi

I have a problem, I have this list, but I need to merge years which is larger than +5 year from current year..

So the list would be :

2018: 1

2021: 1

2022: 3

more than +5 years: 65

Or even better

0 years: 1

3 years: 1

4 years: 3

more than +5 years: 65

• ###### 1. Re: If larger then X, then SUM / merge

Try creating a calculated field like this:

IF [Year]-YEAR(TODAY())>=5 THEN

"5+ Years"

ELSE

STR([Year]-YEAR(TODAY())) + " Years"

END

See attached sample.

• ###### 3. Re: If larger then X, then SUM / merge

Looks like your year field is a date, so change it to YEAR([Estimated End of Life])

• ###### 4. Re: If larger then X, then SUM / merge

christ it actually worked ! brilliant - thanks a lot

• ###### 5. Re: If larger then X, then SUM / merge

Actually one more thing - why isn't 0 years showing "count" and the text "years"

And there are two disttinct count of "END OF LIFE+5" one showing 65 which is the correct number, and one showing "1" - any ideas ?

• ###### 6. Re: If larger then X, then SUM / merge

No problem. If that answers your questions, would you be so kind as to mark my response as the correct answer? This will close the thread and will make it easier for others to find the answer to similar questions in the future

• ###### 7. Re: If larger then X, then SUM / merge

Hi Ken, any idea on my last question?

• ###### 8. Re: If larger then X, then SUM / merge

Any chance you can share your workbook?

• ###### 9. Re: If larger then X, then SUM / merge

I think the problem was the text didn't fit, so I just removed the description