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
RicFischer
Helper I
Helper I

Determine if Person has particular string in other column

Hi,

 

I have a table like the one below. Each document "type" can have a specific set of comments. I want to be able to find out if Person = "Ric" && Comments Contains "Skill1" is TRUE or FALSE. Specifically, I just want to lookup a person and see if a particular strings exists in ANY occurence of the comment field for that person. For reference, my real table is named "DocList".

 

PersonDocumentComment
RicAmateurSkill1 Skill2
JohnAmateurSkill1
SamAmateurSkill1 Skill2 Skill3
JohnProAbility1
SamProAbility1 Ability2
JohnMasterColor1 Color2

 

Thanks for your help.

1 ACCEPTED SOLUTION
Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @RicFischer - In this situation, I would use Power Query to Text.Split and "Unpivot Other Columns".  This would convert you example table to the following:

PersonDocumentComment
RicAmateurSkill1
RicAmateurSkill2
JohnAmateurSkill1
SamAmateurSkill1
SamAmateurSkill2
SamAmateurSkill3
JohnProAbility1
SamProAbility1 
SamProAbility2
JohnMasterColor1
JohnMasterColor2

 

You will find it easier to perform the conditional measure and also to group by and slicer by the "Comment".

View solution in original post

3 REPLIES 3
RicFischer
Helper I
Helper I

I'm open to suggestions. I have thousands of rows of data. All persons will appear multiple times and some people may have multiple occurences of the same document.

 

I would prefer having a separate table that lists each person once and has a bunch of true/false columns named Skill1, Skill2, Ability1, Ability2, Color1, Color2, etc. In that table, I wouldn't care about the document itself because each of the Comment items are separate regardless of the document.

 

The reason I'd like a table is for reusbility in other reports.

Daryl-Lynch-Bzy
Resident Rockstar
Resident Rockstar

Hi @RicFischer - In this situation, I would use Power Query to Text.Split and "Unpivot Other Columns".  This would convert you example table to the following:

PersonDocumentComment
RicAmateurSkill1
RicAmateurSkill2
JohnAmateurSkill1
SamAmateurSkill1
SamAmateurSkill2
SamAmateurSkill3
JohnProAbility1
SamProAbility1 
SamProAbility2
JohnMasterColor1
JohnMasterColor2

 

You will find it easier to perform the conditional measure and also to group by and slicer by the "Comment".

vanessafvg
Super User
Super User

can you demontrate what you what to end up with? 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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.