Forum Discussion

SOppeneer's avatar
SOppeneer
Frequent Visitor
4 years ago
Solved

Obtain value from string with complex criteria in Power Query

Hi Everyone,   I have a dataset with material descriptions and their purchased quantities, where some material descriptions mention a percentage of "pure material" (e.g. without water). I would lik...
  • AlexisOlson's avatar
    4 years ago

    How about this?

     

    Text.Middle(
        Text.Trim(Text.BeforeDelimiter([Column1], "%")),
        1 + Text.PositionOfAny(
                Text.Trim(Text.BeforeDelimiter([Column1], "%")),
                {" ", "(", "-"},
                Occurrence.Last
            )
    )