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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

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 greaterthan 75 then Actual hrs
- IF % Complete is lessthan 75 then pick value which ever is higher in Estimate hrs or Actual hrs
- IF Estimate is Blank then use Actual hrs

 

AllanBerces_0-1763878429688.png

OUTPUT

AllanBerces_1-1763878475889.png

JOB No% CompleteEstimate hrsActual hrsFinal hrs
2328444350.003615.7236
23284900100.0026010.3110.31
2328399974.0022489.82224
2328450470.0022468.61224
23284310100.0021285.9885.98
2324766350.00248308.87308.87
23111481100.0022411.5811.58
2327303880.00248170.88170.88
2324763656.00212435.35435.35
23247667100.0022452.7452.74
2327482143.002662.1262.12
2328400967.0021241.6212
2326733334.0022492.65224
2328578688.00212110.4110.4
2328430488.0021227.2327.23
2328403290.00215384.98384.98
2324767773.0048221.21221.21
2324766023.00248160.26248
232840360.0021586.81215
232840570.00308130.73308
232843860.002153.47215
2328477656.0096212.19212.19
2328484276.007219.7219.72
2328469443.0024170.12170.12
2328405223.00215138.61215
231886290.00284196.07284
232843110.0021224.79212
2328409489.0021271.3671.36
2328408467.003691.6791.67
2327312977.0021283.1483.14
2328441198.0021248.6548.65
2320764789.00224217.48217.48
2328464956.00224179.03224
1 ACCEPTED SOLUTION
qqqqqwwwweeerrr
Solution Sage
Solution Sage

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

View solution in original post

2 REPLIES 2
qqqqqwwwweeerrr
Solution Sage
Solution Sage

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

Hi @qqqqqwwwweeerrr thank you very much for the reply work as i need

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.