Oh my...! You DIDN'T KNOW this about WEEKS?!

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 109

  • @MrRobvanzutphen1
    @MrRobvanzutphen1 2 роки тому +5

    Hi Bas, great video as always! Weeks are a really pain the *ss. What people also should be careful about is that every 7 years the number of weeks in a year is different. When calculating the 'same week previous year' you' ll have to deal with this as well. Then another issue is that because of that, for example, Christmas doesn't always fall in the same weeknumber. So another complexity to deal with! Good to read from everyone's reactions I'm not the only one fiddling with weeks 😊

    • @marounsader318
      @marounsader318 2 роки тому

      can you share please same week last year measure or approach ?

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +1

      @@marounsader318 Total Sales LY =
      VAR LastYear = YEAR( MAX(dimDate[Date]) ) -1
      VAR Result =
      CALCULATE(
      [Total Sales],
      dimDate[Year_ISO] = LastYear
      )
      RETURN
      Result

    • @marounsader318
      @marounsader318 2 роки тому

      @@HowtoPowerBI thank you so much 🙏

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

    This video gave me the solution to a client requirement for reporting week over week calculations! They needed the previous year included, but did not want to show the year in the visual and the usual filters were filtering out the data. Thank you!

  • @JustRandomExplorer
    @JustRandomExplorer 2 роки тому +3

    Wow did not know the WEEKNUM iso formatting "21". Thanks! Keep it up. You are one of the few PBI youtubers that actually present valuable content. Keep it up!

    • @JustRandomExplorer
      @JustRandomExplorer 2 роки тому

      And thanks for giving the formula for ISO_Year! Great content!

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

    Paused the video in the middle, to say you that you are a great instructor.
    I was always stuck at these week based calculations, and was searching for some articles or videos that could help me understand it better. This is the video I was looking for.
    Thank you so much, keep posting such great contents, wish you health and happiness. 😊

  • @alicedwonderland7733
    @alicedwonderland7733 2 роки тому +1

    The 'Don't Summarize' option for certain columns is amazing! Until now, I kept using it in all the tables I inserted in the reports, over and over. Bas, you rule.

  • @dcpowered
    @dcpowered 2 роки тому +2

    This is extremely useful!! I've been struggling for months to get a running previous week calculation! But could you PLEASE make a full video on the ultimate calendar table which includes the week number for several years, for example, from 2020 until 2025?

  • @utkudulger517
    @utkudulger517 2 роки тому +14

    3 hours ago I was looking just for this. Now it is there, you literally made my day. Thank you very much and keep up the good work👍👋🏻

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      haha in just in time 😅happy I could help! 😊

  • @EYEmaginary
    @EYEmaginary 2 роки тому

    I’ve been struggling so much with calculations per week. If possible always try to avoid. This helps a lot in understanding what is going on and not go crazy.

  • @innocentigiwa5509
    @innocentigiwa5509 2 роки тому +1

    Thanks for this. How do we take it further by showing Week 1 to Week 4 or Week 5 for each month. Every time we want to see Week 1 to Week 4 or Week 5 of each month. That way for example we're able to compare Week 3 of previous month with that of current month.

  • @TheTiM731
    @TheTiM731 2 роки тому +2

    Great videos! Could you help me in solving the next problem? Instead of scrolling through a long table of data or using a filter selection pane of 52 weeks, I would like to use 2 buttons in the form of arrows in order to skip to next or previous week(s). Is this even possible in Power BI?

  • @DrumingSession
    @DrumingSession 2 роки тому +2

    Amazing - whenever I have a question pop into my head, you have a video to answer it. Great content as always!

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +1

      Happy to have the perfect timing! Hopefully next time the same :)

  • @garyknott681
    @garyknott681 2 місяці тому

    Cool trick to create a week ID that continually rises, also from year to year!

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

    Hi Bas - good to know (tricky) - I have 3 small questions for you :
    1) Instead of building continuous weeks, can we use OFFSET function to have the previous sales ?
    (as this is on the previous line or will we have issue when go over a new year ?)
    ===> Happy New Year to you by the way 🎄
    2) For Europe, maybe the video is missing the last info "(INT([Date]-Weekday([date], 3) - _StartWeek1)+7)/
    --> what do we have to write after /
    3) Why '3' in the formula for Europe ?
    Thank you in advance - Geneviève

  • @unnikrishnansanthosh
    @unnikrishnansanthosh 2 роки тому +1

    i was searching for this and here you are, thank you BAS

  • @ivyzhu394
    @ivyzhu394 Місяць тому

    so thankful for your videos! I'm glad that i found this channel. Where can i find the tutorial for the 4-4-5 calendar please?

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

    Thanks for the video!
    Is there a way to incorporate week into the standard date hierarchy? Your solution is good for one measure, but what if I have a ton of them? Do i need to create a second measure for each of them just to be able to track it per week?

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

    just one question though - what if I need to be able to drill down correctly between ISO year and the true date year? is there a solution for this?

  • @alirohman57
    @alirohman57 10 місяців тому

    Great video. Thanks! Can you tell me, what should I change for the calculation if my week is Sunday to Saturday?

    • @HowtoPowerBI
      @HowtoPowerBI  10 місяців тому

      3:57 in the video ->
      return_type Week begins
      1 or omitted Sunday
      2 Monday
      11 Monday
      12 Tuesday
      13 Wednesday
      14 Thursday
      15 Friday
      16 Saturday
      17 Sunday
      21 Monday

  • @user-jf4vt6nb4m
    @user-jf4vt6nb4m 2 роки тому

    Thanks for this. How can I avoid the error in the US standard week format when transiting between years without resorting to ISO cos my week is Sunday to Saturday?

  • @brightonalbert3237
    @brightonalbert3237 2 місяці тому

    can we go back wards i.e. from week no to week start date or week end date

  • @MatusiSK
    @MatusiSK 2 роки тому

    Great Video!! It would be really great if you mentioned how to sort the ISO week in column or line chart so Week 52 appears at the beginning and not the end. Thanks.

  • @SupernovaSmith
    @SupernovaSmith 10 місяців тому

    I'm confused on how he setup the variance. I can't get it to properly correlate the Min/Max Year. Also, I assume DateKey is something Bas setup separately?

  • @waqarhanif4402
    @waqarhanif4402 2 роки тому

    Thanks a lot Bas , I did this for month too now I want to achives same thing for days please help me in this regard.

  • @PiyushaRani-e6w
    @PiyushaRani-e6w Рік тому

    One Question, DAX to get week number starting from Saturday to Friday.

  • @letbloodline
    @letbloodline 2 роки тому

    In European format using weekid_iso or -7 days doesn’t give the exact same results? Am I missing something?

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

    Hi Bas, Im following your video but I seem to be having an issue when completing this For "(INT([Date]-Weekday([date], 3) - _StartWeek1)+7)/ When using "/" I receive an error. Is there supposed to be more after that's missing in the video? I appreciate any help! thanks. And love the videos! Very informative :)

  • @punith26
    @punith26 2 роки тому

    Watching all your videos and trying in my system. Thank you😄 !!

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +1

      awesome Punith, thanks! 😊😎👊

  • @Twyfie1
    @Twyfie1 6 місяців тому

    Hi Baz, I have been going over this video again but I am still having a problem with dates. I have visuals that are filtered by month slicer. However, if a week spans two months, it doesn't show. Any idea how I solve this, please?

    • @HowtoPowerBI
      @HowtoPowerBI  6 місяців тому

      Difficult to say where you are going wrong. I would double check the week column. Does it return the last date of the week (which would result in your problem) or do you have it like w1, w2, … for all the dates that fall in the respective weeks

  • @ItsMeProday83
    @ItsMeProday83 10 місяців тому

    Nicely done, thanks for this!

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

    When I write 21 as the second argument to weeknum , it gives error as unrecognised parameter

  • @Jacoba_0_813
    @Jacoba_0_813 Місяць тому

    great tutorial. thanks

  • @mehdihammadi6145
    @mehdihammadi6145 2 роки тому

    Thank Bas for this great topic. Now, in addition to a repository for calendar elements and fiscal elements, there will be a repository for ISO Items

  • @br3185
    @br3185 2 роки тому

    Is there a way to sort multiple dates in order on a chart. Say month, week, day. So that I can show a day in calendar order?

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      yes, you can use the sort by column feature -> see explanation here ua-cam.com/video/T6p5xy35UPE/v-deo.html

  • @cindypayet281
    @cindypayet281 10 місяців тому

    Very, very USEFUL. A great big thank you !

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

    i hoped you would have a solution for this one in M (power query)

  • @govardhanbola1195
    @govardhanbola1195 2 роки тому

    On the axis I need to represent weekly volume. And the representation should be like 2021-Jan-Week1, 2021-Jan-Week2 etc. Everything works fine but if there are days in a week falls in two months then on the axis it shows like 2021-Jan-Week6, 2021-Feb-Week6. How can I add those days in previous or later week. And I have requirement to show same week in the Last year and show WoW%. But numbers are not showing properly when there is a week falls in two months. Could you please help me with this

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +1

      to calculate the same week last year ->
      Total Sales LY =
      VAR LastYear = YEAR( MAX(dimDate[Date]) ) -1
      VAR Result =
      CALCULATE(
      [Total Sales],
      dimDate[Year_ISO] = LastYear
      )
      RETURN
      Result
      to add days in prev or later week you need to implement a 445 / 454 calendar in your date table

  • @laiqmehdi8704
    @laiqmehdi8704 2 роки тому

    Superb superb superb god bless u always

  • @bayarri81
    @bayarri81 2 роки тому

    Great video! Could you use TOTALYTD with this date table? Thanks in advance!

  • @workstuff5253
    @workstuff5253 2 роки тому

    I hate working with weeks. This will be a nice reference video - thanks

  • @alexmcqueen5563
    @alexmcqueen5563 2 роки тому

    Great video. However for a calendar week ( starting on a Sunday or Monday) I believe you can have 54 weeks in some years so the sequence calculation will not work in all instances?

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      oh indeed 😅😄 happened 5 times since 1900 (1916, 1944, 1972, 2000, 2028, 2056)

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      here is my adjusted version "WeekID", WEEKNUM([Date], 1) + (YEAR([Date]) - _MinYear) * (53 + INT(MOD(YEAR([Date])-1915,28)=1)),

  • @joecharest9724
    @joecharest9724 10 місяців тому

    I am not able to figure out why, in some cases, when I calculate prior week as we have done here (weekID -1) the value returned is blank. Despite the fact that there is continuous data with no gaps.

    • @joecharest9724
      @joecharest9724 10 місяців тому

      I run into similar issues when trying to calculate the same week prior year (week iD - 53), in which I have many blanks returned, yet where there is data, it is correctly locating the proper week in the prior year

    • @HowtoPowerBI
      @HowtoPowerBI  10 місяців тому

      Bit tricky to say what it could be. First check if it is correct for the weeks where it does show. And then see which weeks have blanks. How r they different from the weeks where u do have a value. What should the value be? .. diving deeper like this usually makes me find the problem.

  • @rajnishrajput2367
    @rajnishrajput2367 2 роки тому

    Nice trick as always!! Thanks
    I would like to know the process to create such elegant UA-cam videos
    Additionally, I wanted to know is there a way to create Power BI like in built slicers to connect with bookmarks in order to create web page like GUI in PBI

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      Thank you so much Rajnish! That's really nice to hear. I will think about creating a behind the scenes video. I think what you are looking for is the bookmark navigator - you find it under buttons 🙂

    • @rajnishrajput2367
      @rajnishrajput2367 2 роки тому

      @@HowtoPowerBI Thanks Bas for quick reply.
      I have created a button like slicer with dropdown arrow and a popup window to show slicer like effect but I needed to know if something better can be achieved. Unfortunately due to privacy I can't share the report link which I am developing. Used a lot of tricks from your UA-cam videos.

  • @brianleddo7342
    @brianleddo7342 2 роки тому

    Great vid! Great channel!

  • @tukaramjogdand7023
    @tukaramjogdand7023 2 роки тому

    Thank you Bas, Its really amazing. Thank you for sharing!

  • @Jay-bp1yx
    @Jay-bp1yx 11 місяців тому

    0:00 - 4:50

  • @catherinegould6662
    @catherinegould6662 2 роки тому

    Would also be very interested in 2 week scenarios, would that be just adjusting the increasing week count with 2 weeks instead of 1?

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      yes indeed 🙂 just replace "-1" with "-2" and that's it

    • @roupyabehera9006
      @roupyabehera9006 2 роки тому

      @@HowtoPowerBI When the year changes, and we are doing -1 for previous week; are we including all the 7 days in the previous week?

  • @dpecoraro66
    @dpecoraro66 2 роки тому

    Bas, how do you sort the table by multiple columns?

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +2

      Hold shift and click on the column headers

  • @kostaszogo21
    @kostaszogo21 2 роки тому

    Hey Bas, have you hacked my laptop?
    This is the topic a customer asked me 3 hours ago and since then i've been struggling to find a solution. And then magically your video notification appeared. And it totally saved the day!!!
    Thanks so much, now i get the chance to look like a power bi guru 😉...

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      Awesome :) this is magic, no?

    • @kostaszogo21
      @kostaszogo21 2 роки тому

      @@HowtoPowerBI This is totally "Houdini and Copperfield together" stuff...

  • @kammarisairam9445
    @kammarisairam9445 2 роки тому

    Great stuff by you.... 😊.

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

    great video but i need to replay it multiple times because im not a fluent english speaker. thanks btw

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

      thanks, hope the auto translation subtitles help a bit

  • @angeliquedefays2991
    @angeliquedefays2991 2 роки тому

    Hey, thank you for all the Nice content !
    I have an issue with the dates ... how can i remove a date hierarchy. I found on google how to remove it on the whole file but this is not what i want :'(

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +1

      thank you Angélique! My guess is that you are using the auto date/time intelligence, which creates a hidden date table for you with the hierarchy (that you can't delete). So you would need to turn auto date/time off and build a custom date table and then you have more control over the date table. For more details see this video -> ua-cam.com/video/MhC4zj2byBQ/v-deo.html

    • @angeliquedefays2991
      @angeliquedefays2991 2 роки тому

      @@HowtoPowerBI thank you very much for your quick answer !
      This morning i worked on a brand new dashboard using a lot of new things thanks to your vidéo, i really love them, i hope you will continue à very long time to do this ^^
      I wish you à very good night, thx Again for everything

  • @Yourivanhien
    @Yourivanhien 2 роки тому

    Heel nice Bas, dank!

  • @jpfm79
    @jpfm79 2 роки тому

    Thank you BAS,great video as always. Can you show how to get a value of a week in comparison with diferente years? for example show in week 1 of 2022 the value of week 1 of 2021.

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +2

      I think this will work :)
      Total Sales LY =
      VAR LastYear = YEAR( MAX(dimDate[Date]) ) -1
      VAR Result =
      CALCULATE(
      [Total Sales],
      dimDate[Year_ISO] = LastYear
      )
      RETURN
      Result

    • @alicedwonderland7733
      @alicedwonderland7733 2 роки тому

      @@HowtoPowerBI This is just what I wanted to ask!!! Thanks, Bas!

  • @MrSparkefrostie
    @MrSparkefrostie 2 роки тому

    Now to hunt for th number to use for first satuday of feb starts the year

  • @vignesversb
    @vignesversb 2 роки тому

    simply bravo Bas !! :) 🤩👌

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому +1

      thank you for watching again Vignesver 😊🙂

    • @vignesversb
      @vignesversb 2 роки тому

      @@HowtoPowerBI i am your regular fan 😀

  • @japumon
    @japumon 2 роки тому

    U are amazing bro

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      Thank you so much for watching! 😊

  • @patrickkinbonso1809
    @patrickkinbonso1809 10 місяців тому

    How to deal with leap year please?

    • @HowtoPowerBI
      @HowtoPowerBI  10 місяців тому

      the logic of a leap year is captured in the date table as in the video

  • @rrayss
    @rrayss 11 місяців тому

    Merci

  • @shrikantbadge3978
    @shrikantbadge3978 2 роки тому

    I appreciate 👍👍👍👍

  • @syedmohdabbas488
    @syedmohdabbas488 2 роки тому

    Can you help me find job in power bi.

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      Not really but i keep my fingers crossed 🤞 all the best to you!

  • @derrickkuria4206
    @derrickkuria4206 2 роки тому

    Was waiting for how to integrate weeks to Fiscal year..

    • @HowtoPowerBI
      @HowtoPowerBI  2 роки тому

      that topic deserves a video on its own 🙂 however it comes down to adding columns for the fiscal year and week to your date table - similar logic as in this video

  • @himaya-relaxsleep1410
    @himaya-relaxsleep1410 5 місяців тому

    so you're telling me that a free looker studio has a more convenient date manipulation and date drill downs?

  • @anhnguyenduy6861
    @anhnguyenduy6861 2 роки тому

    21 should be available as a suggestion lol

  • @lazybones77
    @lazybones77 2 роки тому

    awesome content, but I wish that the ratio of power bi : your face in videos, would be more in favour of power bi.

  • @ahmetyildirim7268
    @ahmetyildirim7268 2 роки тому

    Bingooo

  • @jaimesegurapena
    @jaimesegurapena 2 роки тому

    You haven't notice that leap years starting on saturdays have 54 weeks... 1+52*7+1 = 366.
    Won't a little correction every 28 years being needed, being the next one on 2028?

    • @BjornV1976
      @BjornV1976 2 роки тому

      ISO only has 52 in 2028 and in 2020 53. don't know about the US version, their systems have no logic and should not be used in my opinion.

  • @raeesg
    @raeesg 2 роки тому

    FIRST!

  • @johnpatrickwoolbright4232
    @johnpatrickwoolbright4232 2 роки тому

    ??o?o?? ?

  • @primary4075
    @primary4075 8 місяців тому

    Nah.... Too complex. I would rather use python with chat GPT for bug fixing.