Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Custom Column in Power Query Editor - Transformation

I have 3 columns in my Power Query table.   Application Number, Stage & DateTime.   The table will be sorted based on DateTime. I need to create a custom column named 'FLAG' which get updated as ...
  • amitchandak's avatar
    4 years ago

    Anonymous , This is something you can get easily in DAX then power query. So in case you want DAX

     

    new column

     

    var _max = maxx(filter(Table, [Application No] = earlier([Application No]) && [DateTime] < earlier([DateTime])),[DateTime])
    return
    if( [Stage] <maxx(filter(Table, [Application No] = earlier([Application No]) && [DateTime] =_max),[Stage]), "Y", blank())