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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

IF else statement with multiple condition

 

Hi Good Morning,

I have a formula from excel that I can't seem to find a way to put in my formula in power BI. Sorry not really sure on how power BI works till now. 
here's the formula : = =SUM(AH2:AK2,AN2)+IF(AF2="O",AO2,0). Anyone can help to solve this pls?

here's the table:

test3423.JPG=SUM(AH2:AK2,AN2)+IF(AF2="O",AO2,0)

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

In Power Query, add a custom column. 

 

[AH] + [AI] +   any other columns     + (if [AF2] = "O" then [AO2] else 0)

 

Make sure that the columns have the correct datatypes

View solution in original post

1 REPLY 1
HotChilli
Super User
Super User

In Power Query, add a custom column. 

 

[AH] + [AI] +   any other columns     + (if [AF2] = "O" then [AO2] else 0)

 

Make sure that the columns have the correct datatypes

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors