Forum Discussion

alice11987's avatar
alice11987
Helper I
2 years ago
Solved

Remove duplicate text between columns

In Power Query, I would like to get the column [Result] based on Column A and Column B.  In Column A and Column B, there are duplication of texts, I would like to extract the part without duplicatio...
  • ChiragGarg2512's avatar
    2 years ago

    alice11987 Create a column using this dax:

    DIFF =
    var _len1 = LEN('Table'[Column1]) + 1
    var _len2 = LEN('Table'[Column2])
    var _len = _len2-_len1
    return
    RIGHT('Table'[Column2], _len)
     
    This would take the length of string in Column A and remove the length from Column B giving the length of desired string in Column C and RIGHT will take the right part of string of that length.