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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
AllanBerces
Post Prodigy
Post Prodigy

Multiple IF Condition

Hi and good day to all,

Can someone help me on my new calculated column. I have a table with column scope, % materials, Budgeted hrs, Treade and Hour Equevalent. Basically what i want to achieved is 

  • if the Trade is equal to Scaff, then the Hour Equevalent is equal to Budgeted hrs
  • if the the Materials Column is Blank then the Hour Equevalent is equal to Budgeted hrs
  • if the Materials Column has value then the Hour Equevalent is equal to (Materials x Budgeted Hours) except for the Scaff Trade

Table:

AllanBerces_0-1737796973291.png

Desired Output

AllanBerces_1-1737797058277.png

Thank you

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @AllanBerces  - You can create the calculated column for "Hour Equivalent" in Power BI using DAX.

Hour Equivalent =
IF(
    Heoutput[Trade] = "Scaff",
    Heoutput[Budgeted hrs],
    IF(
        Heoutput[% Materials] = BLANK() || Heoutput[% Materials] = "Blank",
        Heoutput[Budgeted hrs],
        Heoutput[% Materials] * Heoutput[Budgeted hrs]
    )
)

 

rajendraongole1_0-1737801074602.png

 

Please check and i hope it works at your end.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

4 REPLIES 4
AllanBerces
Post Prodigy
Post Prodigy

Hi @rajendraongole1 @divyed @DataNinja777 thank you very much for the reply, I tried all your solution and it's perfectly. 

divyed
Super User
Super User

Hello @AllanBerces ,

 

You can try below dax :

 

Hour_Equivalent =
IF(
    'table1'[Trade] = "Scaff",
    'table1'[Budgeted_hrs],
    IF(
        ISBLANK('table1'[Per_Material]),
        'table1'[Budgeted_hrs],
        'table1'[Per_Material] * 'table1'[Budgeted_hrs]
    )
)

 

divyed_0-1737803873270.png

 

Please modify table and field names or let us know in case you want differenyt result.

 

Cheers

 

LinkedIn : https://www.linkedin.com/in/neeraj-kumar-62246b26/
DataNinja777
Super User
Super User

Hi @AllanBerces ,

 

Your requirement can be easily handled with a calculated column in Power BI using the DAX formula below similar to the Excel example you produced:

Hour Equivalent =
SWITCH(
    TRUE(),
    'YourTable'[Trade] = "Scaff", 'YourTable'[Budgeted hrs],
    ISBLANK('YourTable'[% Materials]), 'YourTable'[Budgeted hrs],
    'YourTable'[% Materials] * 'YourTable'[Budgeted hrs]
)

 

Best regards,

rajendraongole1
Super User
Super User

Hi @AllanBerces  - You can create the calculated column for "Hour Equivalent" in Power BI using DAX.

Hour Equivalent =
IF(
    Heoutput[Trade] = "Scaff",
    Heoutput[Budgeted hrs],
    IF(
        Heoutput[% Materials] = BLANK() || Heoutput[% Materials] = "Blank",
        Heoutput[Budgeted hrs],
        Heoutput[% Materials] * Heoutput[Budgeted hrs]
    )
)

 

rajendraongole1_0-1737801074602.png

 

Please check and i hope it works at your end.

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.