Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have data in a table 'listData', one of the columns is 'status' which contains one of ~40 text values indicating the status of the record.
These may contain any of the following (shortened for brevity)
I have a second table 'staticData' with a single column 'completedStatuses' that contains a subset of these values that indicate a record is complete. This table contains the following (again shortened)
I would like to create a new column in listData called 'completed' that displays a Y or N (or 1 / 0 or true/false) if the value in the 'status' column in listData is contained in the table/column 'staticData[completedStatuses]'
I've run through the list of functions and tried to understand anything that looks likely and get either errors or syntactic failures that I don't understand.
The List.* functions (list.MatchAny, list.contains, list.ContainsAny) all return
'Expression.Error: We cannot convert the value "AFAX " to type List.
Details:
Value=AFAX
Type=[Type]
where I am assuming it isn't looking at the whole completedStatuses column as the list, just the first cell.
Text.Contains gave me some True/False output but it didn't follow any matching pattern I could understand.
I've been going round in circles trying to find a way to do this and I'm not getting anywhere. Can someone point me in the right direction?
Solved! Go to Solution.
Hi @MrPatrick
Can you create a sample for both tables?
Thanks Jimmy, that's worked.
Whats frustrating is that I would've sworn that's what I tried when I first came across the list.contains function. Clearly not though as this is working where it wasn't before.
Appreciate your help.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |