Forum Discussion

antoineL's avatar
antoineL
Frequent Visitor
5 years ago
Solved

Date.WeekOfYear

Important notice: I am living in Europe, not in the US.

 

I am having wrong results with Date.WeekOfYear: this year (2021), it constantly shows me week number that are off by 1. That is, for a source date which is Monday January 25th, it returns 5 when it should be 4: week 1 starts on 1/4 (if a Monday), week 2 starts on 1/11, week 3 starts on 1/18. As you might know, week numbers are important in some industries.

 

It seems to me there is a missing optional parameter in that function which should be probably the minimum number of days in the first week of the year, this parameter would default to 1 which is the current computed value (US standard? Excel/1-2-3 inherited?) but ought to be set to 4 when using the European (or Industrial, or ISO) standard.

Then the programmers at Microsoft would fine tune the code to achieve the result of 52 or 53 when the date is Saturday January 1st }:->

  • Icey's avatar
    Icey
    5 years ago

    Hi antoineL ,

     

    Thanks for your suggestion! Please post your idea on Power BI Ideas.

    It is a place for customers to provide feedback about Power BI.

    What's more, if a feedback is highly voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

     

     

    Best regards

    Icey

     

    If this post helps, then consider Accepting it as the solution to help other members find it faster.

6 Replies