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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

IF Else statement for custom column

Hello,

I will like to make an if else statement in a column (which already consist of a custom made averaging formula) which i will call it column C

Prior to this, I have column A and I have numbers in Row 1 to Row 10

After which, I have column B with numbers in Row 1 as well as null in certain Rows leading to Row 10 

Where and how do I put in the if else statement in column C such that my output (in column C) will be

if Column A Row 1 (for example) has numbers and Column B Row 1 has numbers, Column C will be the average of column A Row 1 and column B Row 1 (this is the average formula i mentioned earlier)

else Column A Row 2 has numbers and Column B Row 2 has null , Column C will be equal to the numbers in Column A Row 2

I hope I am clear in explaining the above.

Let me know if you need further clarity

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

 

I am not sure if I totally understand your question. Please see if below info is helpful.

Column = if(ISBLANK('Table'[B]),'Table'[A],('Table'[A]+'Table'[B])/2)

1.PNG

 





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@Anonymous 

 

I am not sure if I totally understand your question. Please see if below info is helpful.

Column = if(ISBLANK('Table'[B]),'Table'[A],('Table'[A]+'Table'[B])/2)

1.PNG

 





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

Proud to be a Super User!




Anonymous
Not applicable

Thank you for solving my problem 😀

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors