Forum Discussion
socialengaged
8 years agoNew Member
OR
Hello
Can you please help me out with this formula?
(if Text.Contains([Custom], "cloud", Comparer.OrdinalIgnoreCase) then "Cloud"
else if Text.Contains([Custom], "nuvola", Comparer.OrdinalIgnoreCase) then "Cloud"
else null) or (if Text.Contains([Custom], "ecommerce", Comparer.OrdinalIgnoreCase) then "ecommerce"
else if Text.Contains([Custom], "ecommerce", Comparer.OrdinalIgnoreCase) then "ecommerce"
else null)
The OR does not work. My wanted output should be
Cloud | ecommerce (for some cells)
Cloud (for some cells)
ecommerce (for some cells)
Thanks
Eugenio
You may add a custom column as follows.
= Text.Combine( { (if Text.Contains([Custom], "cloud", Comparer.OrdinalIgnoreCase) then "Cloud" else if Text.Contains([Custom], "nuvola", Comparer.OrdinalIgnoreCase) then "Cloud" else null) , (if Text.Contains([Custom], "ecommerce", Comparer.OrdinalIgnoreCase) then "ecommerce" else null) } , " | " )
2 Replies
- v-chuncz-msftCommunity Support
You may add a custom column as follows.
= Text.Combine( { (if Text.Contains([Custom], "cloud", Comparer.OrdinalIgnoreCase) then "Cloud" else if Text.Contains([Custom], "nuvola", Comparer.OrdinalIgnoreCase) then "Cloud" else null) , (if Text.Contains([Custom], "ecommerce", Comparer.OrdinalIgnoreCase) then "ecommerce" else null) } , " | " )- socialengagedNew Member
Thanks! It worked like a charm! :)