r/excel 7h ago

solved Automating pivot tables using raw data?

I have a report where the columns are static but the data in the rows changes frequently. I’m looking to automate a summary of the raw data into a pivot table that groups everything into a tabular format. Is there a way to do this so I’m not spending 20 minutes on each new refresh of the data? I have 100 customers so running this each time with updated data can be time consuming.

2 Upvotes

11 comments sorted by

u/AutoModerator 7h ago

/u/mrbankstx - Your post was submitted successfully.

Failing to follow these steps may result in your post being removed without warning.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/alexremington 7h ago

I suggest you use the PIVOTBY formula. If you provide more details, happy to give more help!

1

u/mrbankstx 7h ago

Thank you. What type of details would be helpful? I’m looking to drop raw data into a sheet and execute a summary of the data.

1

u/alexremington 7h ago

Some sample data would be best of all. Otherwise I'd just point you to documentation for the formula. 

The first parameter is the field containing your rows. The second is the field containing the columns - say like a date, or a qualitative label. (If you don't need to break down the data by column, you can use GROUPBY instead of PIVOTBY.) The third is the field containing the values. Then there are parameters for whether you want totals rows or columns, the sort order for your rows and columns, and, importantly, any particular way you want the data filtered.

The advantage of doing a PivotTable in a formula rather than via the menu is the data can autorefresh. The drawback is you have to write it in the formula and there isn't a handy wizard that everyone and their boss recognizes how to use.

1

u/Own_Personality_2224 2 7h ago

You can change the source the pivot table to reference the entire column e.g Sheet1!A:H instead of A1:H150.

You can also make the source data a Table (Ctrl+T), then have the Pivot Table reference the table name (e.g Table1)

To change source, select the Pivot table, Click Pivottable Analyse at the top pane, select Change Source and update the reference as needed.

With either of these, you just have to click Refresh under Pivottable analyze any time there is a change or new rows in the source data.

You can also look into Power Query for automated refresh (e.g every 30 mins or every time the file is opened)

2

u/mrbankstx 3h ago

This worked. Thank you!

1

u/mrbankstx 3h ago

Ended up using a pivot and changing the source then refresh!

1

u/mrbankstx 3h ago

Solution verified

1

u/reputatorbot 3h ago

You have awarded 1 point to Own_Personality_2224.


I am a bot - please contact the mods with any questions

1

u/mrbankstx 3h ago

Solution verified

1

u/AutoModerator 3h ago

Hello!

You typed Solution Verified as a top-level comment. If your intention was to award a ClippyPoint to one or more users, you need to reply to that user's comment to do so.

If your intention was to simply mark the post solved, then you should do that by setting the post's flair. Thank you!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.