Forum Discussion

TheG's avatar
TheG
Icon for Advocate I rankAdvocate I
9 years ago
Solved

Adding JUNE Year Edn Financial Year reporting Columns to DATEDIM table

Hi Community,   I have loaded a DATEDIM table using query. My table looks like below:   I now want to add the following: Financial Year (Displays as "FY 2014" would be based on 1/07/2013 to...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Garry,

    That sample Power Query script extends the Date table per this line:

    #"Invoked FunctionSource" = Source(#date(#"Start Year", 1, 1), Duration.Days(DateTime.Date(DateTime.FixedLocalNow()) - Date.AddDays(#date(#"Start Year",1,1),-1)), #duration(1, 0, 0, 0)),

    I suggest you add an "End Year" parameter, and then amend the script line above to:

    #"Invoked FunctionSource" = Source(#date(#"Start Year", 1, 1), Duration.Days(#date(#"End Year", 12, 30) - #date(#"Start Year",1,1)), #duration(1, 0, 1, 0)),

    Then, if you set your "End Year" parameter to 2025, it should extend the Date table to 31/12/2025