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.
Hi Everyone,
I seem to be sleeping.. and strugling with something that should be fairly simple. I need to build a conditional column that has to take in values dependent on a combination of existing values in 2 other colums
Column A Column B Column C
TM A NOTOK
TM B Super
TM C Super
MS B Nice
NB C OK
In powerquery i can build
IF column A = MS then Nice else if column A = NB then OK [ but i need here a combination of values:
TM+B or TM+B = Super
TM+A= NOT OK
I can't seem to use "and" with or.. and it is late...maybe a hint will help
Solved! Go to Solution.
This will do all but the "NB" logic, but I think you'll get the idea. You most definitely can use "and" but you cannot use the conditional column builder to do it. You'll need to build your formula manually in a custom column.
= if [Column A] = "MS" then "Nice" else if [Column A] = "TM" and ([Column B] = "B" or [Column B] = "C") then "Super" else if [Column A] = "TM" and [Column B] = "A" then "NOTOK" else null
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThis will do all but the "NB" logic, but I think you'll get the idea. You most definitely can use "and" but you cannot use the conditional column builder to do it. You'll need to build your formula manually in a custom column.
= if [Column A] = "MS" then "Nice" else if [Column A] = "TM" and ([Column B] = "B" or [Column B] = "C") then "Super" else if [Column A] = "TM" and [Column B] = "A" then "NOTOK" else null
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks... I will give it a try.. i hope this was just me sleepy 🙂
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 |
---|---|
102 | |
53 | |
21 | |
13 | |
11 |