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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Super User
Super User

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
Super User
Super User

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.