Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

use of "LEFT() or RIGHT()" type functions in Query Editor / Custom Column

I'm trying to add a column in the query editor by using an if-then statement based on the left x characters of one of the other columns in my table. When I use a nested if statement in the table itse...
  • PattemManohar's avatar
    7 years ago

    Anonymous  Functions in DAX and M-Language (Power Query) are different.

     

    You need to use as below in Power Query Editor as custom column

     

    if Text.Start(column,5) = "abcde" then "a" else "b" 

     

    if Text.End(column,2) = "de" then "d" else "e"