This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi there,
first time posting but I have been looking around a lot.
I'm trying to create a custom column which identifies for which values in column B exists in column A (i.e. they do not need to exist on the same row).
For example:
column A column B custom column
orange banana FALSE
apple orange TRUE
mango pear FALSE
I have seen solutions in DAX although I need this in powerquery, because I intend to pivot the table depending on the results.
From this article: https://towardsdatascience.com/power-bi-functions-list-contains-list-containsany-list-containsall-87... I tried to use the following formula:
= Table.AddColumn(#"Previous Step", "Custom", each List.Contains({#"Previous Step"[column A]},[column B]))
But it has not worked (everything outputs as false).
Thanks in advance!
Solved! Go to Solution.
Thanks,
solution ended up being: = Table.AddColumn(#"Previous Step", "Custom", each List.Contains(#"Previous Step"[column A], [column B]))
Thanks,
solution ended up being: = Table.AddColumn(#"Previous Step", "Custom", each List.Contains(#"Previous Step"[column A], [column B]))
Darn I didn't realize that I left your opening brace in there!
--Nate
It'll work if you rewrite it like:
= Table.AddColumn(#"Previous Step", "Custom", each List.Contains({#"Previous Step[column A], [column B]))
--Nate
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.