Are you using SAMEPERIODLASTYEAR in your reports? Then you need to know this... | DAX , Power BI 082

Поділитися
Вставка
  • Опубліковано 22 січ 2025

КОМЕНТАРІ • 43

  • @Nalaka-Wanniarachchi
    @Nalaka-Wanniarachchi Рік тому +1

    Not only for sameperiodlastyear,other TI functions have same issues in different contexts .So i followed the offset method based on calender table.That is 100% accurate on different granular levels. Brian Julius and Greg deckler has published many articles,videos on this.

  • @workstuff5253
    @workstuff5253 Рік тому

    A side question. @6:55 your DAX measure start and end date is using the month and day functions. If your calendar table has the month and day numbers as fields already, could/should you use the MAX/MIN of those instead?

  • @samirvaghasiya9918
    @samirvaghasiya9918 Рік тому +1

    Thanks very much :) It is helpful. I was not aware about this glitch. Thanks

  • @mostafabahnasi5512
    @mostafabahnasi5512 Рік тому

    How is the calendar made?

  • @NicolasFabre-s2x
    @NicolasFabre-s2x 11 місяців тому

    This is great. Thanks!
    Do you think it is possible to add to the DAX calculation also the time?

  • @williamarthur4801
    @williamarthur4801 Рік тому

    Does the same thing happen for DATEADD ,

    • @CurbalEN
      @CurbalEN  Рік тому

      Most likely as SMEPERIODLASTYEAR is syntax sugar for DATEADD

  • @TomGee-n1n
    @TomGee-n1n 7 місяців тому

    I wish you would provide a link to this file download, not the entire site

    • @CurbalEN
      @CurbalEN  7 місяців тому

      Completely understand your complain. The reason why I do it this way is because I had to change servers once before and all those links broke. I had like 500 links :(

    • @TomGee-n1n
      @TomGee-n1n 7 місяців тому

      @@CurbalEN Thank you!!

  • @mrbartuss1
    @mrbartuss1 Рік тому

    Yesterday, Goodly released video exactly about this. What a synchro

    • @CurbalEN
      @CurbalEN  Рік тому +3

      😂😂 I released mine for members yesterday, so I am innocent! Was the solution the same too?

  • @nikakalichava8012
    @nikakalichava8012 Рік тому

    excellent, did not know about this! Thank you for sharing.

  • @nikolagrkovic8769
    @nikolagrkovic8769 Рік тому +1

    Did you make you date table properly? Meaning, does you date table have every date for all years present?

    • @CurbalEN
      @CurbalEN  Рік тому

      Yes :)

    • @nikolagrkovic8769
      @nikolagrkovic8769 Рік тому

      @@CurbalEN
      God, now I have to go and check 50 reports with 30 measures... Why I chose PowerBI, why...

    • @nikolagrkovic8769
      @nikolagrkovic8769 Рік тому

      Actually, no, I will let my clients inform me about this...

    • @CurbalEN
      @CurbalEN  Рік тому

      😢 Sorryyyy

    • @CurbalEN
      @CurbalEN  Рік тому

      😂

  • @zaps922
    @zaps922 16 днів тому

    how about PREVIOUSYEAR('Calendar'[Date])

  • @mdhidayat5706
    @mdhidayat5706 Рік тому +2

    It's also tricky to calculate SPLY when this year is leap year.

    • @CurbalEN
      @CurbalEN  Рік тому

      Leap years are always fun!!

  • @AndrewDale-s2c
    @AndrewDale-s2c Рік тому +1

    I've never liked the sameperiod functions as they ignore days of the week. Why would you want to compare sales on a Monday to a Sunday? Also holiday dates differ.

    • @CurbalEN
      @CurbalEN  Рік тому

      Yeah, they should say same datel last year. A same day last year would be welcomed!

  • @gennarocimmino
    @gennarocimmino Рік тому

    Hello Curbal,
    Always interesting your tuorials
    But how can I retrieve the.pbix file you used in the video?
    Thanks

    • @CurbalEN
      @CurbalEN  Рік тому +1

      It is the northwind dataset, but others have asked so I will add it to the download center next week

    • @gennarocimmino
      @gennarocimmino Рік тому

      @@CurbalEN
      Thks so much

  • @wojtekmzks
    @wojtekmzks Рік тому

    Do you have a full data range in your calendar table? I mean all years with dates from 01-01 till 12-31? Because this is required for time intelligence calculations to work properly. Also waiting for the file to test it :)

    • @CurbalEN
      @CurbalEN  Рік тому

      Sorry I forgot! As i mentioned, it works if you have a full calendar, but it is a common practice not to have it.

  • @radudragulescu2353
    @radudragulescu2353 7 місяців тому

    Sa iti dea al de sus sanatate si multa fericire :* 100% working

  • @juja2819
    @juja2819 Рік тому

    Thank you! i will use DAX :)

  • @kahhengyeong7947
    @kahhengyeong7947 Рік тому

    PARALLELPERIOD(Date,-12,MONTH) is also another problematic function because it seems to not work when it's down to days granularity. Funnily, SAMEPERIODLASTYEAR was the fix.
    Anyway, thanks for this because might never know when it comes useful.

  • @jarosaw4013
    @jarosaw4013 Рік тому

    Thx❤

  • @mshparber
    @mshparber Рік тому

    Agree. They have to fix this.

  • @ivanrybalchenko7225
    @ivanrybalchenko7225 Рік тому +2

    This behavior described in defenitive guide to dax book.

    • @CurbalEN
      @CurbalEN  Рік тому +3

      It should be in the docs though…

  • @learningnotes4952
    @learningnotes4952 Рік тому

    Try not to use date column from Fact table in Time Intelligent function, use date column from Dimension table (from seperate calendar table ) would probably solve this issue.

  • @hamishmaxa6509
    @hamishmaxa6509 Рік тому

    So is today really today and tomorrow really tomorrow once you publish to the service and the service and local datetime zone might be different to where the local user and their settings are :)

    • @CurbalEN
      @CurbalEN  Рік тому +1

      Yeah, why make it easy right? 😂

  • @alexrosen8762
    @alexrosen8762 Рік тому

    Horrible, but a great solution to the problem 👌

  • @jbyxxx
    @jbyxxx 4 місяці тому

    In my case, SPLY manually returns the sum of the whole year for each month. However, I see in this video the daily breakdown of the 15,6K. I dont understand why I dont get the same result :/