Forum Discussion

CP4L21's avatar
CP4L21
New Member
5 years ago

Pivot and Group Rows of Many Dates into Columns

Hi,

I have rows that contain dates and I want to Pivot those rows into a colmns. However, I want those dates to be grouped when i pivot them. For example, I have sales data for a given month that is broken down by each day and each day's date has multiple transactions. I want to group the dates into 4 columns: 7 Days Sales, 14 Days worth of Sales, 21 Days worth of Sales and 30 Days. 

 

If i do the traditional Pivot of rows, i will get as many columns of dates as there are rows. How can i pivot rows into columns while groupoing these rows based on the above mentioned 4 groups? 

4 Replies

  • AlB's avatar
    AlB
    Community Champion

    Hi CP4L21 

    Can you provide an example of the initial table? Make sure that the content can be copied (i.e. not on a picture)

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.

     

     

     

  • i cant reply because it keeps telling invalid HTML. any sugesstions how to work around it ?

    • AlB's avatar
      AlB
      Community Champion

      CP4L21 

      There seems to be a problem over the last days. I've heard several people complaining about that HTML error message. It usually works fine.

      Share a file (Excel for instance) with the tables in it.

      You have to share the URL to the file hosted elsewhere: Dropbox, Onedrive... or just upload the file to a site like tinyupload.com (no sign-up required).

       

      Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

      Contact me privately for support with any larger-scale BI needs, tutoring, etc.