March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Need help with a simple calculation/custom column that I can't seem to figure out.
I have a column named "IsWin" with values of "True" or "False", and a column "Status" with a value "Loss", among others.
All I need is, if IsWin is false and Status is loss, then TrueLoss, else "NotTrueLoss" for any other combination.
However, any number of things I try don't seem to work out. Right now I have:
= if(([isWin] = "False") then if ([Status] = "Loss") then "TrueLoss" else "NotTrueLoss" else "Other").
This is valid, but just fills all fields with "Other." Any help? I don't feel like this should be hard, but to my knowledge you can't do "if-and-else" statements using the Conditional Column wizard.
Thanks.
Solved! Go to Solution.
If the conditions get more complicated (like using and or or), then use "Add Custom Column" instead of "Add Conditional Column".
If your "IsWin" field has logical values true/false (rather then text "True"/"False"), you can add a custom column with the following formula:
= if not [Iswin] and [Status] = "Loss" then "TrueLoss" else "NotTrueLoss"
If you wish, you can replace not [IsWin] by [IsWin] = false (lowercase)
If IsWin is text, replace not [IsWin] by IsWin = "False", but mind the case as Power Query is case sensitive.
If the conditions get more complicated (like using and or or), then use "Add Custom Column" instead of "Add Conditional Column".
If your "IsWin" field has logical values true/false (rather then text "True"/"False"), you can add a custom column with the following formula:
= if not [Iswin] and [Status] = "Loss" then "TrueLoss" else "NotTrueLoss"
If you wish, you can replace not [IsWin] by [IsWin] = false (lowercase)
If IsWin is text, replace not [IsWin] by IsWin = "False", but mind the case as Power Query is case sensitive.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |