Add a Fiscal Month, Quarter or Year Column in Power Query | Excel Off The Grid

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024

Комментарии • 34

  • @vsrinivasan574
    @vsrinivasan574 2 месяца назад +2

    Thanks, Thanks to Mr.Chandeep through whom we got to know you.

  • @IvanCortinas_ES
    @IvanCortinas_ES Год назад +1

    Excellent proposal. Highly demanded by companies. Thank you very much, Mark.

  • @nothingcanstopyou1086
    @nothingcanstopyou1086 8 месяцев назад +1

    Lots of love from Bharat that is India

  • @Maheshpanduranga1986
    @Maheshpanduranga1986 Год назад +1

    Hi Mark, It was really an excellent way to arrive at Fiscal year and Month. The last one to calculate Fiscal quarter was awesome and brilliant 😊

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      Sometimes it just takes a slightly different thought process 😀

  • @ingridgwladys2827
    @ingridgwladys2827 9 месяцев назад

    Wooow BRILLIANT ! Awesome delivery in 6mins. Thank you soooo much

  • @user-dn5gd1rn9f
    @user-dn5gd1rn9f Год назад +1

    Thank you- somuch easier than what I’ve been doing!

  • @user-pv5md9pl7m
    @user-pv5md9pl7m 11 месяцев назад +1

    very helpful. Thanks so much Mark for sharing your knowledge

  • @V12Pudman
    @V12Pudman 2 месяца назад

    Thank you so much for sharing your knowledge

  • @GoodlyChandeep
    @GoodlyChandeep Год назад +1

    Hey Mark, this is how I do it.
    Fiscal Month = Date.Month(Date.AddMonths([Date], -3))

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      I've used that way previously too, and I suspect it calculates a little faster as there is no if/then/else logic involved.
      However, I went for an approach that applies a consistent logic between months and years, as I think it's easier to understand for those coming from Excel.

  • @wellerlizzie
    @wellerlizzie 6 месяцев назад

    WOW, WOW, WOW, very many thanks.

  • @ankitjainsss
    @ankitjainsss 11 месяцев назад +1

    Brilliant😀

  • @bengiblett2209
    @bengiblett2209 Год назад +1

    Hey Mark, Very useful, thanks. So if I did need to modify it slightly such that the calendar month and fiscal month don't map equally i.e. our fiscal month or "period end" as we call it is usually a few days before or after the actual calendar month end, do you have a clever solution for that scenario? Have you already done a video on it ? My current "clunky" solution is a big long lookup table but I'm sure there are better ways. I would appreciate any suggestions. Thx Ben

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      If it is always a consistent date in the month, then you could adjust it (e.g always 18th of month, or always 4 days before the calendar month end).
      But anything else will requires a different approach which probably involves a manual table containing month end dates.

    • @bengiblett2209
      @bengiblett2209 Год назад

      @ExcelOffTheGrid Sadly, it's not consistent. We have a 4-4-5 weeks per period pattern that needs adjustment once every 6 years into a 4-4-6 quarter, resulting in a 53 week year to try and keep in sync with the calendar.

    • @opl1989
      @opl1989 3 месяца назад

      @@bengiblett2209 Maybe this might help if you haven't already found a solution ruclips.net/video/lEa4ZiucYsI/видео.htmlsi=96iec5vsoJv_q9vE

  • @kebincui
    @kebincui Год назад +1

    Hi Mark. At 4:27 for Fiscal Year calculation, I feel if Date.Month(Date)

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      If you do that, you’ll get the wrong year.
      That’s why the logic is always a little trickier than we might expect it to be.

    • @kebincui
      @kebincui Год назад +1

      @@ExcelOffTheGrid Thanks Mark for your reply. It seems that I have been wrong for many years 😢 . Take date "15 March 2023" for example, although I know it is in the last fiscal month (UK finance year), according to the formual in the video, it belongs to financial year 2023. I had thought it belongs to financial year "2022", not 2023. I thought finanical year 2023 starts from 1 April 2023. Thank you for your correction.

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      @@kebincui Usually it’s based in the year of the year end date.
      To avoid the confusion many companies use FY23/24.
      But it’s possible that some might apply a different approach, but you can normally build the logic for any scenario.

  • @nicolemullis5551
    @nicolemullis5551 6 месяцев назад

    Do you have a clever way to add fiscal week number with the same example of April 1 start?

  • @RameezMannil
    @RameezMannil Год назад

    Hi, I need the last Thursday of the month to be considered as month cut-off. The remaining days of that month goes to next month. Any solutions please..
    Apparently I live in the GCC

  • @jerrydellasala7643
    @jerrydellasala7643 Год назад

    I hate all those #"" in the M Code and typically rename every step removing spaces at least, and prefer them to be more descriptive. Also, rather than having to adjust the FY End month in multiple places if I need this query again, rather than missing an entry I prefer using a variable - just as one would use the value in a cell rather than hard coding a value in a Worksheet. Towards those ends I adjusted the M Code manually adding the line of code for the variable in the Advanced Editor immediately after the Source line. Doing it that way bypasses the PQ Editor getting confused over step sequence (although once there it can be changed without using the Advanced Editor):
    let
    Source = Excel.CurrentWorkbook(){[Name="Dates"]}[Content],
    FYEndMonth = 3,
    ChangedDateType = Table.TransformColumnTypes(Source,{{"Date", type date}}),
    AddedFiscalMonth = Table.AddColumn(ChangedType, "Fiscal Month", each if Date.Month([Date])

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      Hi Jerry - I can agree with all your points there. I also hate the #"" notation, but I'm more relaxed about whether I purposefully go back and rename the steps. I would advise always renaming, but I'll get lazy for a simple solution.
      In the real world, I would include my month end date in a cell in Excel and load it as a parameter, but that's well outside the scope of this video.

  • @lizzieleman1471
    @lizzieleman1471 7 месяцев назад

    How could I get fiscal year to show as 2022-23 for example?

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  7 месяцев назад

      Change to text and use text formulas to generate the text.

  • @rodneyplunkett6688
    @rodneyplunkett6688 Год назад

    Interesting, but how do you determine the fiscal month in a 4-4-5 fiscal calendar?

    • @ExcelOffTheGrid
      @ExcelOffTheGrid  Год назад

      I’ll try to cover that in a future video.
      My guess is that you don’t actually have a 4-4-5 calendar.
      You have a 4-4-5 normally, but occasionally 4-4-6, or 4-5-5 when needed.
      This means that you’ll always be reverting to some form of manual table, as the logic isn’t clear enough.