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
Jkiddin
New Member

Power BI creating a formula in a custom column

I've never worked with Power BI before but i assumed the formulas were similar to Excel but it isn't? I don't know how to create a formula that uses an if statement to calculate a value. What i have right now is: 

IF [Discount] > 0 then value.Multiply([UnitPrice], [Discount]) else 0

but it says the value.multiply is wrong so i don't know if there should be commas or something to separate it since the formula requirements don't pop up as i type. After calculating whether the discount price should be multiplied, i wanted to subtract that price from the value.multiply([UnitPrice], [Quantity]) to get total revenue, but i DON'T know how to even combine these formulas into one long formula like excel does. do i start a new column? a new equal sign underneath? 

Jkiddin_0-1635739095982.png

 

1 ACCEPTED SOLUTION

@Jkiddin 

You have typed "IF" with upper case, Power Query is case sensitive, it should be all lower case here. type it as follows:


 

if [Discount] > 0 then ( [UnitPrice] * [Discount] )  else 0

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Jkiddin , Try like

 

if [Discount] > 0 then [UnitPrice]* [Discount]  else 0

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

it still didn't work 😞 

Jkiddin_0-1635740040276.png

 

@Jkiddin 

You have typed "IF" with upper case, Power Query is case sensitive, it should be all lower case here. type it as follows:


 

if [Discount] > 0 then ( [UnitPrice] * [Discount] )  else 0

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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