Forum Discussion

ShelRose's avatar
ShelRose
Frequent Visitor
2 years ago
Solved

Retirement Year

Hi, 

Im trying to return retirement years in a column based off if Retirement Age for a individual is either 65 or 66. i have another column with date of birth year. 

 

Retirement Year =
SWITCH (
        TRUE (),
        'Table'[RetirementAge]="65", 'Table'[DOB Year]+65 'Table'[RetirementAge]="66", 'Table'[DOB Year]+66)
 
what am i missing here? 
 
thanks in advance 
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi ShelRose ,

    Please try to create a new column with below dax formula:

    Retirement Year =
    SWITCH ( [Retirement Age], 66, [DOB Year] + 66, 65, [DOB Year] + 65 )
    

    Please refer the attached .pbix file.

     

    Best regards,
    Community Support Team_Binbin Yu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies