The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Everyone,
I am trying to create a conditional column based on three criteria. The catch is I want the value to return "Won" based on all three conditions rather than a value for each if statement.
The file I have combines a sales file and quote file into one.
Win Rate = IF('Sales&Quote'[QUOTE_CUSTOMER_NAME] = 'Sales&Quote'[SALES_CUST_NAME],
IF('Sales&Quote'[QUOTE_Customer_PART] = 'Sales&Quote'[SALE_PART],
IF('Sales&Quote'[QUOTE_QUANTITY] >= 'Sales&Quote'[SALES_Quantity],"Won","Loss")))
Above is what I have and I know it is incorrect, but I want the quote customer name to equal the sales customer name, quote customer part to equal the sales part, and the quote quantity to be >= sales quantity, IF all three are true, then "Won", else "Loss"
I'm sure there is a much easier way to write this or the use of a different function. I am open to any and all suggestions.
Thank you as always!
Solved! Go to Solution.
@Anonymous try this:
Win Rate =
IF(
'Sales&Quote'[QUOTE_CUSTOMER_NAME] = 'Sales&Quote'[SALES_CUST_NAME] &&
'Sales&Quote'[QUOTE_Customer_PART] = 'Sales&Quote'[SALE_PART] &&
'Sales&Quote'[QUOTE_QUANTITY] >= 'Sales&Quote'[SALES_Quantity],
"Won",
"Loss"
)
✨ Follow us on LinkedIn
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous if you are adding a column it is going to calculate for each row and store it in the memory.
✨ Follow us on LinkedIn
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Anonymous try this:
Win Rate =
IF(
'Sales&Quote'[QUOTE_CUSTOMER_NAME] = 'Sales&Quote'[SALES_CUST_NAME] &&
'Sales&Quote'[QUOTE_Customer_PART] = 'Sales&Quote'[SALE_PART] &&
'Sales&Quote'[QUOTE_QUANTITY] >= 'Sales&Quote'[SALES_Quantity],
"Won",
"Loss"
)
✨ Follow us on LinkedIn
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I believe that formula would work. Does creating a conditional column read row-by-row or the whole table to get a value? I assume row-by-row