Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
3 years ago
Solved

WEEK OF YEAR ESPESIFICO

Good day, I have a table with 2 years 2022 and 2023. I would like to calculate the weeks only of the year 2023

  • Hi, Syndicate_Admin 

     

    You can try the following methods.
    Date table:

     

    Date = CALENDAR(DATE(2022,1,1),DATE(2023,12,31))

     

    Column:

     

    Weeknum = WEEKNUM([Date],2)

     

    Measure:

     

    Count week = CALCULATE(DISTINCTCOUNT('Date'[Weeknum]),FILTER(ALL('Date'),YEAR([Date])=2023))

     

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, Syndicate_Admin 

     

    You can try the following methods.
    Date table:

     

    Date = CALENDAR(DATE(2022,1,1),DATE(2023,12,31))

     

    Column:

     

    Weeknum = WEEKNUM([Date],2)

     

    Measure:

     

    Count week = CALCULATE(DISTINCTCOUNT('Date'[Weeknum]),FILTER(ALL('Date'),YEAR([Date])=2023))

     

    Is this the result you expect?

     

    Best Regards,

    Community Support Team _Charlotte

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.