cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jklunk Frequent Visitor
Frequent Visitor

Adding rows to group by weeks

I'm creating a report pulling data from Salesforce, and I'm trying to add rows that will group data by each week. These obviously need to update each week the report is run. I created a field from the data that pulls the respective Monday of each week, but need to determine how to autoinsert the row at each change in week and add the words "Week of" in front of the date. I feel like there should be an easy way to do this and I'm just missing it? I've attached a screen shot of how the list current looks in Excel for reference. My raw data looks identical to the screen shot without the grey "Week of" separator.

 

Any help is greatly appreciated.

 

Thanks,

JarrodBid List.gif 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft V-lianl-msft
Microsoft

Re: Adding rows to group by weeks

Hi @jklunk ,

 

You can use the Matrix chart and place the date column and the weekly start date column in the rows of the chart.

Again,please refer to the pbix.

 

Best Regards,

Liang

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

6 REPLIES 6
Microsoft V-lianl-msft
Microsoft

Re: Adding rows to group by weeks

Hi @jklunk,
 
Based on your description, you want the data in each row to mark the start date of each week and add the "week of" field.
You can use DAX to create a calculated column:
 
Column = "Week of "&(Sheet1[date]-WEEKDAY(Sheet1[date],2)+1)

 

You can refer to the pbix.

 

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

 

 

jklunk Frequent Visitor
Frequent Visitor

Re: Adding rows to group by weeks

I'm actually trying to add a row showing "Week of [Month] [Day]" above each group of dates that falls within that week starting on Monday of each week. I'm working on creating it with a macro in Excel but I'd prefer to run it all through Power BI if possible.

 

Jarrod

Microsoft V-lianl-msft
Microsoft

Re: Adding rows to group by weeks

Hi @jklunk ,

 

Unfortunately, according to the chart I know, there is no chart that fully meets your needs in power bi.

Or is this matrix chart the result you want?

test_matrix.PNG

 

Best Regards,

Liang

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

jklunk Frequent Visitor
Frequent Visitor

Re: Adding rows to group by weeks

This matrix could possibly work, if I could get the details showing to the right (no need for count or sum). How did you create that matrix?

Microsoft V-lianl-msft
Microsoft

Re: Adding rows to group by weeks

Hi @jklunk ,

 

You can use the Matrix chart and place the date column and the weekly start date column in the rows of the chart.

Again,please refer to the pbix.

 

Best Regards,

Liang

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

jklunk Frequent Visitor
Frequent Visitor

Re: Adding rows to group by weeks

Liang,

 

This is excellent. One issue I'm having is that it it is consolidating anything with the same due date into one line so I'm losing dating. I'm new to Power BI, so I'm guessing there is an easy way to change this to show all even if Bid Due Date is the same?

 

Thanks,

Jarrod

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors