2 Replies Latest reply on Apr 25, 2017 1:50 PM by Jayson Briggs

    Calculated field based on birthdate

    Jayson Briggs

      I am trying to make a calculated field that will give generation data based on birthdate. I made 5 parameters for each generation like the photo below

      Then I created a calculated field called generation that looks like this

      but when I try to use the field all the values are 'Null'. What am I doing wrong?

        • 1. Re: Calculated field based on birthdate
          Brian Dudley

          Parameters do not work that way. They take on only a single value, although it can be limited to a range.

           

          This is a calculated field that will assign a generation to an individual based on their birth year.

           

          If Year([Birth Date]) < 1946 Then 'Veteran'

          ElseIf Year([Birth Date]) < 1965 Then 'Baby Boomer'

          ElseIf Year([Birth Date]) < 1977 Then 'Gen X'

          ElseIf Year([Birth Date]) < 1995 Then 'Gen Y'

          Else 'Punk'

          End

           

          It can now be used to group records.

           

          If you wanted to be able to change the range for the generations, then you could create parameters for each of the hard-coded years, however, it would be possible for them to take overlapping values -- i.e. each parameter is separate.

           

          Hope this helps.

          • 2. Re: Calculated field based on birthdate
            Jayson Briggs

            Thanks Brian! It's working now.