Forum Discussion

AllanBerces's avatar
AllanBerces
Post Prodigy
8 months ago
Solved

Multiple If

Hi good day can anyone help me on my calculated column with multiple if. - IF % Complete is equal to 0 then Estimate hrs - IF % Complete is equal to 100 then Actual hrs - IF % Complete is greatert...
  • qqqqqwwwweeerrr's avatar
    8 months ago

    Hi AllanBerces , 

     

    Here is my solution: 

    Final Hours =
    VAR Pct = Sheet1[% Complete]
    VAR Est = Sheet1[Estimate hrs]
    VAR Act = Sheet1[Actual hrs]
    RETURN
        SWITCH(
            TRUE(),
            -- 1. If Estimate is blank : use Actual
            ISBLANK(Est), Act,

            -- 2. If % Complete = 0 : Estimate hrs
            Pct = 0, Est,

            -- 3. If % Complete = 100 :  Actual hrs
            Pct = 100, Act,

            -- 4. If % Complete > 75 : Actual hrs
            Pct > 75, Act,

            -- 5. If % Complete < 75 :  pick higher of Estimate vs Actual
            Pct < 75, MAX(Est, Act)
        )

    Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
    Check for more intersing solution here: www.youtube.com/@Howtosolveprobem

    Regards