Using the If statement/Aging

Altair Forum User
Altair Forum User
Altair Employee
edited July 2018 in Community Q&A

I have a column of data for each invoice account ranging from 0 to 300.  How would I use a calculated formula to take my data field, AGE, and have a calculated column represent into categories.  For example, if the number is in the 0 to 30 range, I want a category to be 0-30, 31-60, 61-90, 90-120, ETC. 

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2018

    There are a couple of solutions, but the easiest might be to use a nested if statement. For simplicity, I am going to show how to break down from 0-120.

    if([age]>90,"91-120",if([age]>60,"61-90",if([age]>30,"31-60",0)))

     

    you can also write it like this to make it more understandable:

    if([age]>90,"91-120",

    if([age]>60,"61-90",

    if([age]>30,"31-60",

    0

    )))

     

    Another option would be to use a lookup table as well.