![]() |
VOOZH | about |
Letβs say you have a huge dataset with thousands of rows and multiple columns. You need to quickly analyze what you have in Excel and come up with a few insights before facing your supervisor or stakeholder. Sounds familiar? Itβs a situation Iβve been in plenty of times as an analyst.
Thereβs one powerful Excel feature that always delivers β Pivot Tables!
I am at a stage where I instinctively think of Pivot Tables in Excel when Iβm given large datasets. Itβs such a wonderfully flexible and in-depth tool β thereβs simply no comparison. Pivot tables have helped me summarize massive amounts of data into simple and powerful reports. These tables reveal a lot about the data by converting any column-based data into reports.
Pivot Tables are the nervous system of analytics in Excel.
Here, I will be sharing some of the most useful Pivot Table tricks that I have used in my career. These will help you analyze your data at an even more granular level with just the click of a few buttons.
This is the third article in my Excel hacks, tips, and tricks series. I highly recommend going through the previous articles to become a more efficient analyst:
I encourage you to check out the below resources if youβre a beginner in Excel and Business Analytics:
Pivot Tables provide plenty of options for calculations to summarize your data. From the count of values to the variance of values, the options are endless. Excel provides the sum of values as the default calculation so let us see how can we use other useful calculations.
Here, we will see how to use the average of a set of values.
Letβs take up an interesting problem statement that will help you in your daily life! We are provided with the day-wise expenditure of a particular family. We need to calculate the average amount spent by each family member (sounds familiar?).
You can refer to the below video or follow the steps after this:
https://player.vimeo.com/external/463713844.sd.mp4?s=c3f22e21e10e67db24c8162274e81eab0903efd7&profile_id=165
Click on any cell present in the table:
Weβll locate the pivot table in the Excel ribbon. Go to Insert -> Pivot Table:
Finally, we create our pivot table. In the Create Pivot Table window, youβll notice that the entire range of the table is automatically selected.
You also have the flexibility to form this pivot table in the existing sheet or in a new sheet. Here, weβll form it in a new sheet:
We donβt require all the columns to complete our analysis so weβll choose only the necessary fields. On the right side, a toolbar will appear β PivotTable Fields. We will choose the required field, in our case, these are Member and Amount:
Since we are using only two fields in our analysis, Excel automatically detects the Member field as a row and the Amount field as a value so we donβt need to drag fields in this case.
If you notice, Excel has taken the sum of amount as the default calculation but we require the average of values in our analysis. So let us see how can we do this.
In the PivotTable Fields pane, click on the dropdown β Sum of Amount. Go to Value Field Settings. Youβll find a bunch of different calculations here. Let us select Average:
There you go! We can see the average expenditure of everyone in the family. Congratulations on making your first pivot table!
But do you wonder why mom spent the most amount out of all the family members? What if I want to check the reason behind the extremely high expenditure?
To know where mom spent her money, simply double click on the Mom cell. You will get options to choose the detail field. We will select the field β Spent on and press βOKβ:
We can see that her major expenditure went towards a donation for a relief fund. What a great cause!
So far, we have only understood the average amount spent by each family member. However, it doesnβt provide a clear picture. We as humans tend to understand much more intuitively in terms of percentages so let us see how we can get that in Excel.
This simple trick can provide really interesting insights and it is definitely my all-time favorite! Letβs check out the percentage distribution of the amount spent by the individual family members.
You can refer to the video or follow the steps after the video:
To get the percentage distribution, we need to add the Amount field again to the value field. Weβll do this by dragging the field into the values area:
In the newly added column, select one of the cells and right-click on that.
Youβll find an option of Show Value As. It has a bunch of options that you can explore. Weβll be choosing β% of parent row totalβ for our analysis:
In this analysis, we realize that the member β Me, perhaps the person who made the data, has actually spent 46.5% of the money. Thatβs almost half of the expenditure of the entire family! To understand more about the underlying trend, you can double click and get more details!
Now hereβs a challenge β what if other family members make a demand for the result of this analysis? We assume that they are not well versed in numbers as we are. What is a better way to present this analysis to a non-techical audience?
A visual representation which we can easily generate using Pivot Charts!
Note: We are using the same pivot table and working in the same sheet as that of the pivot table.
Since we require the percentage of the sum of amount spent by each family member, weβll remove the average of amount field from the analysis:
Go to Insert -> Pivot Charts:
Excel has plenty of plots to choose from. Weβll go with a pie chart as it is the most suitable for our analysis:
You can customize your pie chart in just one click and choose from a variety of beautiful options provided by Excel.
Now our analysis is summarized in the form of a pivot chart which makes our analysis really easy to understand!
Did you notice that there is something missing in the analysis? Can you guess what that is? The amount field doesnβt really have a format and that might make it confusing. Let us learn how to add a number format in Excel in just a few clicks.
Number formats are very important and they provide the identity to the numbers present in the pivot table. In the data we are using, the family belongs to an Indian household so the expenditure should be in Rupees. Letβs add this to our existing values!
You may follow the steps or refer to this video:
In the existing pivot table, click on the cell for which you want to change the format. Go to Value Field Settings:
In the Value field settings, go to Number Format.
On the right-hand side, a category list will appear. Weβll go to Currency and choose the Rupees symbol:
Awesome! Now our pivot table contains the number format as well.
The Pivot Table Slicer provides a very simple way to filter our data in a fast and efficient manner. All we have to do is press buttons! Itβs that simple!
Let us take up a problem statement where we are provided with data of an e-commerce company. This data contains different products and their respective sales information. We want to see the sum of sales of individual categories. Letβs check how to do it.
Follow this concise video or refer to the steps below:
Follow step 1 and step 2 to make a pivot table on this data. Here we will be choosing the fields as Products (Row) and Total (Value).
In the top ribbon, go to Analyze -> Insert Slicers:
Choose the field you want to use as a filter. As we require the total amount earned for each category, we will filter data on the field β Category:
Now you have the category in the form of a button. Just press the button to filter data!
Add your data in the form of a table. Usually, the data gets updated time after time and it is desirable that our pivot table is dynamic.
The solution to making your pivot table dynamic is to add data in the form of a table and then simply refresh to get the updated pivot table.
In this article, we covered five pivot table hacks, tips, and tricks for Excel. I hope these tricks will help you with day-to-day niche tasks and save you a lot of time as a business analyst or a data science professional.
Do you have your own Pivot Table tricks to share? Or any other Excel tricks, in general, you would want the community to know? Share them in the comments section below!
Product Growth Analyst at Analytics Vidhya. I'm always curious to deep dive into data, process it, polish it so as to create value. My interest lies in the field of marketing analytics.
GPT-4 vs. Llama 3.1 β Which Model is Better?
Llama-3.1-Storm-8B: The 8B LLM Powerhouse Surpa...
A Comprehensive Guide to Building Agentic RAG S...
Top 10 Machine Learning Algorithms in 2026
45 Questions to Test a Data Scientist on Basics...
90+ Python Interview Questions and Answers (202...
8 Easy Ways to Access ChatGPT for Free
Prompt Engineering: Definition, Examples, Tips ...
What is LangChain?
What is Retrieval-Augmented Generation (RAG)?
Wow!! Really practical tips and tricks for Excel users and fans like me. Good job; keep it up !!π
Hi sir .i have one excel file with a large amount of data.in this file i have details of electric and water meters.some consumers have both electric and water meters and some have only electric meters and some have only water meter All the consumers have details of electric and water meters in a 2 different row. In row 1 have details of electric meter and in row 2 have details of water meter.all the rows are around 60000 .so i want to allign electric and water meter of same consumer in one row.so my file will become small size .in other word i want to allign same account id of consumers in one row.please help me how to allign same account id of two rows in one raw Thanks
Edit
Resend OTP
Resend OTP in 45s