Forum Discussion

aury_lola's avatar
aury_lola
Frequent Visitor
1 year ago
Solved

Power Query: Extract string from one column based on another column in the same table

Hi everyone,

 

I have a table with 2 columns where one is the combination of the other one plus some characters. As you can see in the image below, neither the "Prefix" nor the characters I'm trying to isolate follow any kind of logic in terms of number of characters, delimiter, etc. I only know that "Combination" = "Prefix" + something.

 

 

 

 

 

 

 

 

 

 

 

 

How can I isolate that something extra (in yellow above) either in the same column or as a custom column?

I can't use the extract or the split by delimiter functions because of the lack of logic. And this table comes from a source that I cannot edit it, but I still need to find a way to isolate that something extra.

 

Ideally I'd like to do it in power query, but I could make it work in DAX as well if the first is not possible.

 

Thank you advance for any help!

  • aury_lola 

    is this what you want?

     

    =Text.End([Combination],Text.Length([Combination])-Text.Length([Prefix]))

4 Replies