Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ShelRose
Frequent Visitor

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 
1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

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 )

vbinbinyumsft_0-1698302604435.png

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.

View solution in original post

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

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 )

vbinbinyumsft_0-1698302604435.png

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.

danextian
Super User
Super User

Hi @ShelRose ,

 

It is unclear what you're trying to achieve. Can you please provide  a sample data that we can  copy paste into Excel as a table and from that sample data, what is the expected result?

This sticky post should guide you on how to get an answer faster:

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/3456... 

 










Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.