Sorting months in fiscal calendars in DAX

Sdílet
Vložit
  • čas přidán 10. 08. 2020
  • This video shows a basic technique used to sort months according to a fiscal calendar, by using a couple of calculated columns and the “sort by column” feature of Power BI. Article and download: sql.bi/492713?aff=yt
  • Věda a technologie

Komentáře • 23

  • @vlogniten
    @vlogniten Před 9 měsíci +1

    thank you for this tutorial. been trying to figure this out and you tutorial is so easy to follow for newbie like me in power bi

  • @dsfshshfhgsghs
    @dsfshshfhgsghs Před 3 lety +1

    Alberto, tante grazie por tus clases. Estoy aprendiendo muchísimo con tus clases (y las de Marco también, por supuesto). You both are very generous for giving us such fantastic content for free (I think of your online courses at SQLBI's web too, not only these videos). Thank you very much! Saludos desde Buenos Aires, Argentina!

  • @lindabond9307
    @lindabond9307 Před 2 lety +1

    As if our lives were not difficult enough but .... Fiscal Month. Thanks for this!

  • @amadiftikhar3227
    @amadiftikhar3227 Před 4 lety +1

    Just what i was looking for. Hats off Alberto great explanation.

  • @pleblanc1972
    @pleblanc1972 Před 4 lety +1

    Sometimes we need a refresher. Great video @alberto!!!!

  • @niavras
    @niavras Před 3 lety +2

    Great video, as always! Thank you!

  • @user-xf1uh4ro2z
    @user-xf1uh4ro2z Před 8 dny +1

    Bravo!

  • @elenakanina4550
    @elenakanina4550 Před 2 lety +2

    Thanks for your Great Job. You are GURU more me!!!

  • @ImranHussain-xv4se
    @ImranHussain-xv4se Před 3 lety +1

    Alberto, thanks for sharing valuable information

  • @emirtuncer
    @emirtuncer Před 4 lety +1

    Thanks for great video :)

  • @AbhishekPal-sy9ee
    @AbhishekPal-sy9ee Před 3 lety +1

    GREAT WORK.HELPFUL

  • @lindabond9307
    @lindabond9307 Před rokem +1

    I'm back again, looking over this info. I'm creating a independent date hierarchy (FY / FY Month Year / Date) and now I need to sort the FY Mth Year. I guess I have to create Month plus Year value though it's not so straight forward...Happy holidays to you!
    (And I did find a solution - it was much easier in PQ - I created a cust col with Date.StartofMonth and then converted that to a whole number, and used that to sort my Mth/Years)

  • @gondebas
    @gondebas Před rokem

    Hi Alberto, have you ever covered the topic of dynamic toggling by the user between Calendar and Fiscal years? I mean displaying the sales by months, either calendar or fiscal months, according to user choice. I tried to do it with Field Parameters however it always collapses Months in the matrix to full Years. And the Field Parameters do not seem to allow changing sort of Months as you demonstrated in the video. The only way left is bookmarks, however this is a "dirty" approach.

  • @mchopra1989
    @mchopra1989 Před 3 lety

    In my case fiscal month starts from December, what formula should I apply?

  • @tubeitz
    @tubeitz Před 4 lety +1

    Great technique, thank you :)

  • @sujkubvs
    @sujkubvs Před 3 lety +1

    Hi Alberto, Thanks for the video, it really helped me a lot, but one question > How to get month name as "mmm" in the Fiscal month?

    • @SQLBI
      @SQLBI  Před 3 lety

      See these articles/tools:
      www.sqlbi.com/articles/creating-a-simpler-and-chart-friendly-date-table-in-power-bi/
      www.daxpatterns.com/time-patterns/
      www.sqlbi.com/tools/dax-date-template/

  • @woodywood8325
    @woodywood8325 Před 3 lety

    Hello, How can we get a YTD out of that? I can't add my Variable "Fiscal Months" to my formula as it is not considered as a date=> YTD = CALCULATE (SUM('YTD Test'[Actual Sales Turnover]),DATESYTD('YTD Test'[Date for YTD].[Date]))
    thanks

    • @SQLBI
      @SQLBI  Před 3 lety

      DATESYTD has an argument for the end of year, but you can also evaluate one of the many patterns available here: www.daxpatterns.com/time-patterns/

  • @user-ef4oc3vc6r
    @user-ef4oc3vc6r Před 3 lety

    What about calendar with hours?

    • @SQLBI
      @SQLBI  Před 3 lety +1

      You should split date and time in two different columns. You can create a Time table similarly to what you do with a Calendar table, choosing the granularity you prefer (hours, minute, second). Keep in mind that reducing granularity improve performance: time by hour is faster than time by second.

  • @etclner635
    @etclner635 Před 3 lety +3

    This is incorrect and will fail if you have any month greater than June(6). Try to run this DAX for any starting month JULY(7) to DECEMBER(12) and check on the "Fiscal Month Number".
    The proper solution when suppose the start month is OCTOBER(10):
    Fiscal Month Number = IF('Date'[Month Number] > 9, 'Date'[Month Number] - 9, 'Date'[Month Number] + 3)

    • @SQLBI
      @SQLBI  Před 3 lety

      Yes the code is just a sample and has to be adapted to the beginning of the fiscal year. You can find a more complete and flexible implementation here: www.sqlbi.com/tools/dax-date-template/