Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
KAURM
Helper I
Helper I

Compare one list (column) to another in Power Query Editor to return a true/false if it appears

Morning, I hope you are all well.

 

I'm struggling with two columns in two queries, the first is in the query #"Key phrases from responses":

 

KAURM_0-1638263691355.png

 

and the second is in #"Categories" query:

KAURM_1-1638263777356.png

 

I also have copied these two queries with just the column (list) key phrases in that query to #"Key phrases from responses (2) and #"Categories (2) (#"Sheet (2) in the screenshot as renamed after.

 

I want to check if the row values (words/phrases) in key phrases column in the Key phrases from responses query appear or do not appear in the Categories [key phrases] column (list) by returning a true or false value in an additional custom column. 

 

I also have the data in an excel file please message me if you would like me to send it to you to help with the query as I am unable to attach a file or copy and paste due to exceeding the character limit. 

 

Any assistance you can provide in this matter would be much appreciated. 

 

Thanking you.

 

Kind Regards,

 

KAURM

 

@BA_Pete  @AlexisOlson  @mahoneypat  @Vera_33 @v-stephen-msft @ImkeF @edhans @v-eqin-msft @v-kelly-msft 

 

 

2 ACCEPTED SOLUTIONS
Vera_33
Resident Rockstar
Resident Rockstar

Hi @KAURM 

 

It looks like they are all lower case already, you can go directly to the query #"Key phrases from responses" to add a custom column

 Table.AddColumn(yourPreStep, "yourNewColumnName", each List.Contains(Categories[key phrases],[key phrases]))

View solution in original post

KAURM
Helper I
Helper I

Hi @Vera_33 

 

Thank you for your help! I did this before and it didn't work.

 

Just realised that when using Power BI Text Analytics the key phrases/words have spaces in front of them.

 

Just trimmed the column and now it works 🙂

 

Thanks for your help!

View solution in original post

2 REPLIES 2
KAURM
Helper I
Helper I

Hi @Vera_33 

 

Thank you for your help! I did this before and it didn't work.

 

Just realised that when using Power BI Text Analytics the key phrases/words have spaces in front of them.

 

Just trimmed the column and now it works 🙂

 

Thanks for your help!

Vera_33
Resident Rockstar
Resident Rockstar

Hi @KAURM 

 

It looks like they are all lower case already, you can go directly to the query #"Key phrases from responses" to add a custom column

 Table.AddColumn(yourPreStep, "yourNewColumnName", each List.Contains(Categories[key phrases],[key phrases]))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors