Skip to main content

Exploring pivot tables

Are you looking forward to dealing with large datasets in excel? If that's the case then you must consider pivot tables. If you are a novice in this data world then you must focus on the pivot tables as they will be a stepping stone for you as a data analyst. So what is a pivot table? The pivot table allows you to understand the data where you can generate certain tables and graphs. I consider it as a baseline for business intelligence tools. If you look at the features of the pivot table it is quite similar to BI tools with limited options. It is an integral part of many analyses in excel and at our blogs, we have worked in-depth with pivot tables in RFM segmentation.

In today's blog, the focus will be on exploring features that a pivot table can offer for a data analyst. Let's dwell around with it!!! I will be using the Sample Superstore data for the analysis. As you must be aware of inserting a pivot table. You need to select the dataset completely and in the insert tab, you can find the option to insert a pivot table. A toggle will open and you can set the location of the pivot table.



Pro Tip-: The above-mentioned process is only good if you know that this is the final data and there will be no updates associated with it. As an analyst, you don't want to start from scratch for every quarter or month. The solution to this problem is to feed all the data into a table.

(For more pro tips do follow our blog)




After feeding the dataset into the table you can change the name of the table and you can select the option of summarizing using a pivot table which is present in the table design. After selecting that a similar toggle will open where you can see the data range and can select the location for the pivot table.





Once you are done with this now we will be looking to get the Top 10 customers and to do so we will be selecting the customer name in the rows and dragging the sales amount in the values. You will get a simple table where you can see all the customer names to select the Top 10 you need to select the filter drop down in customer name and in value filters, you can see the Top 10 option. When you select the top 10 option a toggle will open.





Now we are looking to make the analysis more interactive in nature. To do so we are adding the slicer along with the table. We are creating a table where sales are highlighted for each and every sub-category and category. If you see in the pivot fields we want to add a slicer of different regions. To achieve that you need to right-click on the region and you can select the add slicer options.


If you work with pivot tables you will a notice peculiar thing i.e. the default sum is attached to the different values (Sum of sales). To change that you need to go to the pivot table field and suppose you need to change the sum to count for quantity which is present in the values section. You need to right-click on the quantity and you can see the value field settings where you can change the sum to count and you can rename the name of that metric.



Isn't that amazing? Let's get to the key highlight of this blog and as an analyst, I try to incorporate this in most of my work. So we are taking subcategories in rows and the sum of sales in values. The idea is to show the values of sales along with the bar graph which will represent the percentage of sales in the same table. To achieve that I will drag the sum of sales again in the values so we will get a duplicate. For the second sales column format it to the percentage of column total.



After converting the second sum of sales in percentage go the conditional formatting which is present on the top. Under conditional formatting select the data bars and solid fill. It will give you a bar for the first row to obtain similar bars for the entire column you need to select the formatting toggle which is present along with the table. In that select apply to the sum of sales2 and you will get the bars for the whole column.




And you almost land up with a nice analysis but we need to focus on the formatting part. We need to select the conditional formatting and in that select manage rules which will open a toggle where select the option to edit the rules. In that change, the type to a number and the value can lie between 0.2-0.3. Also, you can change the color of the bars.




This is some sort of analysis that a stakeholder wants to see because it represents a great picture of your sales and it looks very intuitive in nature. There are a lot of different features that the pivot table offers. As a business intelligence enthusiast, I generally prefer BI tools over excel and pivot. BI tools offer a wide variety of features. In the end, the main objective is to make the data look interesting for everyone and it doesn't matter which tool is used to do that.


Thanks for Reading  Let's connect on  LinkedIn. For more such blogs do follow us.























Comments

Post a Comment

Popular posts from this blog

Ultimate Beginners Guide to DAX Studio

There are zillions of external tools available with Power BI but DAX Studio is one of the most commonly used tools to work with DAX queries. It is a perfect tool to optimize the DAX and the data model. In this blog let's shed some light on the basic functionalities that can take your report to the next level. ARE YOU READY?  To start you will need the latest version of the DAX Studio. You can download it from their website . Don't worry you don't have to pay for the license. Fortunately, DAX Studio is a free tool As a BI Developer, I am using DAX Studio regularly. Based on my experience I use it for several purposes but in this blog, I will highlight the most common ones. Extracting a dump of all the measures used in your PBIX. Why do we need to do this? It can be used for documentation purposes also sometimes we try to reuse the DAX and such a dump comes in handy in this scenario. How to achieve it? Open the DAX Studio it is located under the external tools once you open t

Identify and Delete Unused Columns & Measures

Heavy dashboards and a bad data model is a nightmare for every BI Developer. Heavy dashboards can be slow due to multiple reasons. It is always advised to stick with best practices. Are you still figuring out about those best practices then you should definitely have a quick read on Best Practice Analyser ( link ). One of the most common issues with slow dashboards is unused columns and unused measures.  It is very normal to load some extra columns and create some test measures in your dashboard but as a part of cleanup process those unused columns and unused measures should be removed. Why we are removing them? Because if you keep them then ultimately it will increase the size of your data model which is not a good practice.  How to identify the culprits (unused columns and unused measures)? In today's blog we will provide you with 2 most common external tools which will help you in identifying the culprits. More external tools😒. Who's going to pay for this? To your surprise

Best Practice Analyser (BPA) Guide

Do you want to save tons of efforts to check if your data model and PBIX file follows the standard best practices and norms? Then this blog is for you. If you are a follower of our channel we already deep dive into the importance of the DAX Studio as an external tool. If you are a beginner I would highly recommend to visit this blog . In today's blog we will check how Tabular Editor can help to optimize the data model.  Best Practice Analyser allows to define or import best practices. It will make sure that we do not violate the best practices while developing a dashboard. Isn't it exciting!! Before we start make sure you already have Tabular Editor version 2.24.1 installed on your system. To install it do visit this link and select the link for windows installer. Once Tabular Editor is installed it will reflect in your PBIX file under external tool. Also, we need to define the standard rules. To do so in your advanced scripting or C# script copy this and save it via Ctrl+S. An