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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
CP4L21
New Member

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 4
CP4L21
New Member

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

AlB
Community Champion
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).

 

SU18_powerbi_badge

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.

 

Icey
Community Support
Community Support

Hi @CP4L21 ,

 

Please refer to this blog to provide some sample data and your expected result:

How to provide sample data in the Power BI Forum - Microsoft Power BI Community.

 

Please remove sensitive information.

 

 

Best Regards,

Icey

AlB
Community Champion
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)

 

SU18_powerbi_badge

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.

 

 

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.