Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Custom Column with IF and else

i wanted to  create a simple formula either measure or Column Filter Scope IF assignment date = 2022/09/19 = Then "Existing emp Initial launch" If assignment date > date 2022,9,19 = " Role change ...
  • v-jingzhang's avatar
    3 years ago

    Hi Anonymous 

     

    You can add a new column with below code

    New Column = 
    IF (
        'DataTable'[assignment date] = DATE ( 2022, 9, 19 ),
        "Existing emp Initial launch",
        IF (
            'DataTable'[assignment date] > DATE ( 2022, 9, 19 ),
            "Role change",
            IF ( 'DataTable'[assignment date] <= 'DataTable'[hire date], "New Hire" )
        )
    )
    

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it. Highly appreciate your Kudos!