Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

New year data not populating into Query

With the new year, we are looking to add 2023 monthly data into my query but unfortunately, it is not populating. All of the CSV has the correct updated data, but when I export my file I don't see Ja...
  • AlexisOlson's avatar
    AlexisOlson
    3 years ago

    Scroll up to the top of the applied steps. I'm guessing there are a couple of steps/parameters that define the date range with hardcoded values. You can update these to suit your needs.

     

    If you don't want hardcoded values that you need to update every year, it's possible to determine a date range from the data you load in. I often do something like

    [...]
    StartDate = #date(Date.Year(List.Min(Data[Date])),  1,  1),
    EndDate   = #date(Date.Year(List.Max(Data[Date])), 12, 31),
    [...]

    This goes from the start of the year of the minimal date to the end of the year on the maximal date from the Data table.