Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric certified for FREE! Don't miss your chance! Learn more
Hello guys, hope you're good!
I have the following formula in excel, and im trying get the same results in power query:
I tried to use the conditional column in Power Query, but it returned "OK" for all the conditions. This happened because if any of the tests returns "OK," it results in "OK" for all the tests. Is there any way to do this using the M language or something similar?
Thanks in advance and sorry for my bad english hehe
Solved! Go to Solution.
Hello - you could do it like this:
= Table.AddColumn(#"Changed Type", "Custom", each if List.AllTrue ( { [Column2]="OK",[Column3]="OK",[Column4]="OK",[Column5]="OK",[Column6]="OK" } ) then "OK" else "NOTOK", type text)
Use this in a custom column
if List.Contains(List.Range(Record.ToList(_), 1, 5), "NOTOK") then "NOTOK" else "OK"
thank you!! it works
Use this in a custom column
if List.Contains(List.Range(Record.ToList(_), 1, 5), "NOTOK") then "NOTOK" else "OK"
Hello - you could do it like this:
= Table.AddColumn(#"Changed Type", "Custom", each if List.AllTrue ( { [Column2]="OK",[Column3]="OK",[Column4]="OK",[Column5]="OK",[Column6]="OK" } ) then "OK" else "NOTOK", type text)
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 12 | |
| 12 | |
| 10 | |
| 6 | |
| 5 |