Forum Discussion
Extract Special Character String /*
- 1 year ago
Hi JonPT - In power query editor custom column window, you can use Text.Split and List.Select functions to isolate the exact /* string that meets your criteria.If you need to extract based on more complex rules (like excluding /* if it’s part of a larger string), you might need to add more conditions in the List.Select function
let
// Split the string by semicolon
SplitValues = Text.Split([ALL_VALUES], ";"),
// Select only entries that are exactly '/*'
FilteredValues = List.Select(SplitValues, each Text.Trim(_) = "/*")
in
if List.Count(FilteredValues) > 0 then
Text.Combine(FilteredValues, ";")
else
nullHope this works in your scenerio
Hi JonPT - In power query editor custom column window, you can use Text.Split and List.Select functions to isolate the exact /* string that meets your criteria.If you need to extract based on more complex rules (like excluding /* if it’s part of a larger string), you might need to add more conditions in the List.Select function
let
// Split the string by semicolon
SplitValues = Text.Split([ALL_VALUES], ";"),
// Select only entries that are exactly '/*'
FilteredValues = List.Select(SplitValues, each Text.Trim(_) = "/*")
in
if List.Count(FilteredValues) > 0 then
Text.Combine(FilteredValues, ";")
else
null
Hope this works in your scenerio
- JonPT1 year agoRegular Visitor
Many thanks rajendraongole1. That worked perfectly. Really appreciate your super quick response.