Forum Discussion

AllanBerces's avatar
AllanBerces
Post Prodigy
1 year ago
Solved

Multiple IF

Hi and good day, Can anyone help me on my claculated columm using IF function (for ACTIVE Job only)  - IF Job is ACTIVE, then check Est Stat Date if date is 2025  copy the date on the result column...
  • pankajnamekar25's avatar
    1 year ago

    Hello AllanBerces 

    Use this DAX code to create calculated column

    ResultDate =

    IF (

        'Table'[Job Status] = "ACTIVE",

        SWITCH (

            TRUE(),

            YEAR('Table'[Est Stat Date]) = 2025, 'Table'[Est Stat Date],

            YEAR('Table'[Actual Stat Date]) = 2025, 'Table'[Actual Stat Date],

            YEAR('Table'[Est End Date]) = 2025, 'Table'[Est End Date],

            BLANK()

        ),

        BLANK()

    )

     

    Thanks,
     Pankaj Namekar | LinkedIn

    If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.