Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ratercero
Helper III
Helper III

Timeline Slicer - 2017 with 53 Weeks

Hello, 2017 only has 52 weeks and this visual is showing 53 moving week 1 of 2018 to the second of 2018.

 

Can anyone help me adjust this?

Capture.PNG

 

 

 

 

Thanks

10 REPLIES 10
Greg_Deckler
Super User
Super User

Actually, 12/31/2017 is the only day that falls into the 53 week with return type 1. With return type 2, 7 days fall into 53. This is using WEEKNUM.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thank you  @Greg_Deckler, this is not a matter of calculation I am not calculating week number the visual does this, the configuration of the Visual that does not allow to fix this. I dont know if there is a way to contact the developer or something.

 

 

 

 

You can try. The issue here is that the visual is almost certainly using the WEEKNUM to calculate the number of the week and hence it's behavior. 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

It is curious but in the options the only one that its not rigth is the week number all others work perfectly

Except, there ARE 53 weeks in 2017. 12/31/2017 falls on a Sunday, which is the start of the 53rd week.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

This is another subject but there are NOT 53 weeks on 2017, because the week numbers are assigned to the year that has more days on that particular week, however do you know who else can I contact to address this inconsistency?

 

Best Regards

 

RT

I think the disconnect here is that may be how you assign weeks numbers within your organization, but that is not how the WEEKNUM function within Power BI works. You can understand the issue here. It would be difficult to account for how all organizations assign week numbers within their own calendar because I've seen some crazy ways in which companies do this, especially when working with a non-standard calendar like June-June or Feb-Feb, things like that. Bottom line here is that if your week numbers do not line up with the 2 options that WEEKNUM provides, you probably have a couple options:

  1. Contact the developer of the visual and see if you can get them to code in some kind of exception for your circumstance
  2. Create your own version of the visual that works the way you want it to work
  3. Create your own week num column and tie some kind of slicer to that

Bottom line is that this is not an inconsistency within Power BI, it just doesn't work the way you want to see the week numbers shake out.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

I think it's because the American method of week numbering differs from the ISO / European week numbering method. We over here in Europe, normaly use Monday as the start of the week and in case January 1 is on Monday, Tuesday, Wednesday or Thursday, that week is the 1st week of the next year. In case January 1 falls on Friday, Saturday or Sunday, the weeknumber is increased +1 with the previous weeknumber of last year. This is different from the "USA"-method, where the first week of the year depends on what day January 1 falls: in case it's a Sunday, PowerBI calculates week 1, otherwise it calculates a next weeknumber of the previous year for that week.

 

Outlook uses two settings to solve this:

- First day of week (in USA: Sunday, but in Europe, according to ISO weeknumbers: Monday)

- First week of year (in USA: Starts on January 1, but in Europe, according to ISO weeknumbers: First 4-day week).

 

In my opinion, the Timline slicer should be extended with the First Week Of Year setting to solve this issue of incorrect week numbers.

When you set the week start in the Timeline slicer to Mondays, the weeknumber looks correct for European weeknumbers in 2017 and 2018, but in that setting 2018 has 53 weeks instead of 52 because January 1 2019 starts on a Tuesday.

So I guess the Timeline slicer needs to be extended with the First week of year setting, like in Outlook.

 

Business Consultant PPM @ QS solutions
MCTS & MCP

@ratercero - While not documented, you can potentially use 21 as the last WEEKNUM parameter to force 52 weeks.

 

WeekNum21 = WEEKNUM([Date],21)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@ratercero Works great! Many thanks!

Business Consultant PPM @ QS solutions
MCTS & MCP

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.