Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |