Forum Discussion

jklunk's avatar
jklunk
Frequent Visitor
6 years ago
Solved

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,

Jarrod 

  • 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.

6 Replies

  • V-lianl-msft's avatar
    V-lianl-msft
    Community Support
    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's avatar
      jklunk
      Frequent Visitor

      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

      • V-lianl-msft's avatar
        V-lianl-msft
        Community Support

        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?

         

        Best Regards,

        Liang

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