Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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?
Solved! Go to 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
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
it still didn't work 😞
@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
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
72 | |
62 | |
51 | |
48 |
User | Count |
---|---|
204 | |
86 | |
62 | |
59 | |
56 |