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
bmacman
Frequent Visitor

Using the Text.Contains and List.AllTrue

Hi ALl,

I am not getting the results from the Text.Contains to work at all. I am trying to use it as part of the List.AllTrue string. Does it work or any suggestions?

 

if List.AllTrue(
{[Delay Catergory]="Planned Down"}) then "7"
else if List.AllTrue(
{[Delay Catergory]="Planned Down",
Text.Contains([Description], "Plant",Comparer.OrdinalIgnoreCase)=true
}) then "71"

else if

 

This is just giving me a the eresult of 7, never the 71.

 

Thanks in advance.

 

Cheers

Brad

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

if List.AllTrue({[Delay Catergory]="Planned Down",
Text.Contains([Description], "Plant",Comparer.OrdinalIgnoreCase)
}
) then "71"
else if List.AllTrue({[Delay Catergory]="Planned Down"}
) then "7"

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User
Super User

if List.AllTrue({[Delay Catergory]="Planned Down",
Text.Contains([Description], "Plant",Comparer.OrdinalIgnoreCase)
}
) then "71"
else if List.AllTrue({[Delay Catergory]="Planned Down"}
) then "7"

Thanks. I have restrucutred so I am not looking for the same Text.Contains under different delay catergories. 

It works just not quite fully as easily informative, have to have a lot more else if

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