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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
mudassar
New Member

How to Create a Custom Column by using IF Statement

Hi Guys,
I am new to PowerBI.I have been creating a report which need a Custom Coulumn "RPC" 
So my formula is 
=IF(SoldClicks > 0 , Revenue/SoldClicks,0) 
Please see the attached image;
community_help.JPG
What i am doing wrong ? 
Thanks

2 ACCEPTED SOLUTIONS
jthomson
Solution Sage
Solution Sage

I'm guessing that you're using an if to prevent division by zero, just make it as a conditional column giving it the value 0 if it's 0 otherwise give it the value rev, then amend that in the formula bar to rev/soldclicks:

 

asdf.PNG

View solution in original post

No, it doesn't, which is why I indicated to amend it in the formula bar afterwards. Just set it to be one of the two in the conditional column tool and change it once you've got that done.

View solution in original post

4 REPLIES 4
jthomson
Solution Sage
Solution Sage

I'm guessing that you're using an if to prevent division by zero, just make it as a conditional column giving it the value 0 if it's 0 otherwise give it the value rev, then amend that in the formula bar to rev/soldclicks:

 

asdf.PNG

Thanks for your Prompt Reply.
But in "Conditional Column", it does not allow me to divide two fields.
greaterthan.JPG

Thanks

No, it doesn't, which is why I indicated to amend it in the formula bar afterwards. Just set it to be one of the two in the conditional column tool and change it once you've got that done.

Thanks @jthomson
Got Your Point!
Now its Working Fine 🙂 

Helpful resources

Announcements
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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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