Forum Discussion

karkar's avatar
karkar
Helper III
9 years ago
Solved

DATE WEEK

Hello,

 

I am trying to do a table by Week of Month-Year. Actually two tables-one for numerator and the other for denominator.

Unfortunately in the denominator table I am getting some weeks extra.How can that be a possibility?

 

Thanks

 

 

 

Year-Month   Week     Numerator

2016-06          23           100

2016-06          24           150

2016-06          25           170

2016-06          26           166

 

 

Year-Month   Week     Denominator

2016-06          23           1000

2016-06          24           1500

2016-06          25           1700

2016-06          26           1660

2016-06          27           1660

  • Weeks and months don't play nicely when it comes to grouping dates.  As you can see, the first and last weeks start before and extend beyond the month of June 2016.  If you happen to have data in these the week group will be returned.

     

     

     

     

     

4 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee
    Is it because your weeks don't fit nicely into a month. Take a closer look at the days in weeks 23 through 27.
  • What happens if instead of week of year, you put in the week of month?

     

    In doing it that way it will only start from the first date of the month for the first week?

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi karkar,

    I an unable reproduce your scenario, could you please share your resource data or .pbix file for further analysis?

    Best Regards,
    Angelia


  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    Weeks and months don't play nicely when it comes to grouping dates.  As you can see, the first and last weeks start before and extend beyond the month of June 2016.  If you happen to have data in these the week group will be returned.