Forum Discussion

lguelcher's avatar
lguelcher
Regular Visitor
9 years ago
Solved

MAX Date

I'm trying to create a Custom Column that returns the latest date from column 'Week'. I've tried the following:   =Table.AddColumn(table, "MAX Date", each List.Max({[Week]})) However, that formula...
  • blopez11's avatar
    9 years ago

    Not sure how to do it in the query editor, but you could try to add a calculated column using the dax function MAXX, i.e. MAX_DATE = MAXX (table_name, [Week])

  • blopez11's avatar
    blopez11
    9 years ago

    Once you add the max date calculated column, add another similar to

    rolling week = DATEDIFF(Sheet1[week], Sheet1[max date], WEEK) + 1