Forum Discussion

JonPT's avatar
JonPT
Regular Visitor
1 year ago
Solved

Extract Special Character String /*

Hi Power BI Desktop Forum, Newbie here who just joined and hoping you can assist me? Extensive searching and trial and error in PBI Desktop but no luck. Here's my scenario...   I'm trying to extra...
  • rajendraongole1's avatar
    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
    null

     

     

    Hope this works in your scenerio