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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JoeJo
New Member

Group by week

I have a date column and week column. I am trying to group the dates in the date column by week. I have the week as 2025_12 .... Any suggestions please?

2 ACCEPTED SOLUTIONS
Chewdata
Super User
Super User

Hey,

Hopefully this will answer you question, if not as @lbendlin suggested, please provide more informatie on what you are trying to achieve.

In Power Query you can right-click on de column you want to group your data on that column:

Chewdata_0-1742670206346.png

when you click on Group By, you get a new screen. Click on advanced to add multiple aggregations:
all Rows wil give you a nested table with all rows in it.

Chewdata_1-1742670437123.png

 

View solution in original post

rohit1991
Super User
Super User

Hi @JoeJo ,
If you're trying to group your data by week using a column like "2025_12" (which represents year and week), you’re already halfway there. Since your dataset has a properly formatted Week column, you can use it to group your data in visuals or through DAX. This is particularly useful when you want to aggregate values such as sales, transactions, or counts on a weekly basis. Power BI visuals like bar charts or tables will automatically group by the Week column if you add it to the axis or rows. However, if you want to create a summarized table in DAX that shows one row per week with totals or averages, you can use the SUMMARIZE function to group and aggregate based on the Week column.

 

WeeklySummary =
SUMMARIZE(
    YourTable,
    YourTable[Week],                         -- Group by Week column (e.g., "2025_12")
    "Total Sales", SUM(YourTable[Sales]),    -- Example metric
    "Total Quantity", SUM(YourTable[Quantity])  -- Add more measures as needed
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post

6 REPLIES 6
v-karpurapud
Community Support
Community Support

Hi @JoeJo 
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.

Thank you.

v-karpurapud
Community Support
Community Support

HI @JoeJo 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.

Thank you.

 

v-karpurapud
Community Support
Community Support

Hello @JoeJo 

Could you please confirm if your query have been resolved the solution provided by @rohit1991 & @Chewdata ? If not please share the details so that we can assist you better. If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.

Thank you

rohit1991
Super User
Super User

Hi @JoeJo ,
If you're trying to group your data by week using a column like "2025_12" (which represents year and week), you’re already halfway there. Since your dataset has a properly formatted Week column, you can use it to group your data in visuals or through DAX. This is particularly useful when you want to aggregate values such as sales, transactions, or counts on a weekly basis. Power BI visuals like bar charts or tables will automatically group by the Week column if you add it to the axis or rows. However, if you want to create a summarized table in DAX that shows one row per week with totals or averages, you can use the SUMMARIZE function to group and aggregate based on the Week column.

 

WeeklySummary =
SUMMARIZE(
    YourTable,
    YourTable[Week],                         -- Group by Week column (e.g., "2025_12")
    "Total Sales", SUM(YourTable[Sales]),    -- Example metric
    "Total Quantity", SUM(YourTable[Quantity])  -- Add more measures as needed
)

Did it work? ✔ Give a Kudo • Mark as Solution – help others too!
Chewdata
Super User
Super User

Hey,

Hopefully this will answer you question, if not as @lbendlin suggested, please provide more informatie on what you are trying to achieve.

In Power Query you can right-click on de column you want to group your data on that column:

Chewdata_0-1742670206346.png

when you click on Group By, you get a new screen. Click on advanced to add multiple aggregations:
all Rows wil give you a nested table with all rows in it.

Chewdata_1-1742670437123.png

 

lbendlin
Super User
Super User

Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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