Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

No Syntax Errors but Query Won't Work

The Image above is of my Advanced Editor. I have no syntax errors, but get an error message after clicking done. All of the lines are necessary, and the bulk of them add custom columns to retri...
  • AlB's avatar
    5 years ago

    Anonymous 

    Update the bit from #"Removed Duplicates" onwards:

     

    #"Removed Duplicates" = Table.Distinct(#"ClearNulls", { "DATE" } ),
    
    LastStep_ =   Table.SelectRows(#"Removed Duplicates", each [date] >= List.Min(#"Removed Duplicates"[date]) and [date] <= Date.AddYears(List.Min(#"Removed Duplicates"[date]),5))
    
    in
    
      LastStep_ 

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.