Forum Discussion

imranamikhan's avatar
imranamikhan
Helper V
4 years ago
Solved

Power Query Last 7 Days From Max Date Column

Hi everyone,    I want to use Power Query to add a custom column which identifies whether a date value from a date column is "within" or "outside" the last 7 days from the maximum date in the date ...
  • mahoneypat's avatar
    mahoneypat
    4 years ago

    Sorry. Forgot that part. Here you go.

     

    let maxdate = List.Max(#"Previous Step"[Date]) in if [Date] >= Date.AddDays(maxdate, -7) then "Y" else "N"

     

    Pat