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
projects
Regular Visitor

String match condition in conditional columns not working

Hello everyone,
I am trying to group the "Attribute" column data (row-wise) by creating a conditional column and pasting the group name against each element depending on what it's name is in the "Attributes" column. But, the problem I am facing is that, if the name of the element is too long and is shown in the form of wrapped text ( shown in two lines one below another)  in that "Attributes" column, the matching string entered in the conditional column does not exactly match with the original name in the attributes column and hence the conditinal column returns a null value. For example, if I am trying to match "Girder Pre Casting LHS Planned Date" in the Attributes column with the string " Girder Pre casting LHS" as a conditional matching string, the output comes as a null value and not the output string that I specified in the condition. Please refer to the screenshot attached for better clarity.PowerBI Problem.JPG   

1 ACCEPTED SOLUTION
v-angzheng-msft
Community Support
Community Support

Hi, @projects 

 

Go to the advanced editor and change the match value to "A" & "#(lf)" & "B", note that no space should be left between A and B. In you case, the Value should be: "Girder Pre Casting"&"#(lf)"&"LHS"

vangzhengmsft_0-1626835027444.png

my sample:

vangzhengmsft_1-1626835086628.png

Please refer to the attachment below for details

 

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @projects 

 

Go to the advanced editor and change the match value to "A" & "#(lf)" & "B", note that no space should be left between A and B. In you case, the Value should be: "Girder Pre Casting"&"#(lf)"&"LHS"

vangzhengmsft_0-1626835027444.png

my sample:

vangzhengmsft_1-1626835086628.png

Please refer to the attachment below for details

 

 

Hope this helps.

 

Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@projects , Try Text.Contains, if that can help in a new column

Refer if needed

Power Query - Text.Contains: https://youtube.com/watch?v=Hs2q6qcrdgU&feature=share

Thank You @amitchandak , but I have multiple conditions here and I am not sure if text.contains works for multiple conditions because I have multiple groups and different outputs for different strings matched. Please refer the screenshot below for more information.PowerBi problem2.JPG

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.