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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
mdbuzzer
Helper I
Helper I

Why is weekly grouping returning wrong dates?

I am creating bins based of my Date field. I created two bins, one which retrieves the daily bins whilst the other bin is to return weekly dates. The daily bins returns the correct dates but the weekly bins is starting from a date which is not even present in my Date field.

How is this happening?

mdbuzzer_1-1603478102985.png

 

mdbuzzer_0-1603478046918.png

My date field starts from October 1st to October 16th, so why is it starting from September 27th?

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @mdbuzzer ,

 

After my researching, it is by design. Binning splits numeric or date/time data into equally sized groups. If we expand the date range a bit, you will find that October 1, October 2, and October 3 belong to the group beginning on September 27.

 

You could learn more from: 

 

https://dataveld.com/2018/05/10/manual-groups-bins-power-bi/

 

4.png

 

 

 

Best Regards,

Stephen Tao

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @mdbuzzer ,

 

After my researching, it is by design. Binning splits numeric or date/time data into equally sized groups. If we expand the date range a bit, you will find that October 1, October 2, and October 3 belong to the group beginning on September 27.

 

You could learn more from: 

 

https://dataveld.com/2018/05/10/manual-groups-bins-power-bi/

 

4.png

 

 

 

Best Regards,

Stephen Tao

 

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

mahoneypat
Microsoft Employee
Microsoft Employee

That must be the result of the algorithm used to set up the bins.  You can create the week start dates starting on your min date as follows in a column, replacing "Dates" with your actual Date table name.

 

NewBin =
VAR thisdate = Dates[Date]
VAR mindate =
    MIN ( Dates[Date] ) // or use hard coded date like DATE(2020,10,1)
VAR numweeks =
    ROUNDDOWN (
        DATEDIFF (
            mindate,
            thisdate,
            DAY
        ) / 7,
        0
    )
RETURN
    mindate + 7 * numweeks

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I used that code to create a calculated column and the result was nearly right, but it starts with September 30th rather than October 1st. It should return October 1st, October 7th and October 14th.

 

mdbuzzer_0-1603566374363.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors