Skip to main content

New Article

How to SUM by matching partial text in Excel

How to create Hierarchy field to make report faster in PowerPivot?

What is Hierarchy?

Hierarchy is one kind of Custom New Column where few columns are involved. You can also say that it is a Calculated Field. But the difference is, in Calculated Field, you have to calculate among fields and, in Hierarchy Column you have to joint few columns by their reporting priority. Whenever you need to create more than 2 matrix, then you should take help from Hierarchy Column.

Image 1: Report from a table "tblSalesData" and shown the Hierarchy

In the Image 1, I have tried to clearing the concept of Hierarchy with a real sales report. We all MIS Executives do know that, we can generate reports based on 2 matrix (Row vs Column). Sometimes we need to show more that 2 criteria within 2 matrix such as, "Date wise", "Month wise", "Year wise" sales quantity against "Region wise", "Area wise" and "Territory wise".

If we generate the above report in PivotTable we first generally drag the "Year" in "COLUMN" then under this "Year" we drag the "Month" and lastly "Date". Same process we follow for "ROWS" level data in PivotTable. First we drug the "Region" field in "ROWS" and then under this "Region" we drug "Area" and then "Territory". Below is the table setting in PivotTable:

Image 2: PivotTable field setting without "Hierarchy"

So in Image 2, it is clear that, if we don't use Hierarchy field we can generate the required report by drugging and dropping the fields one by one in ROWS and COLUMNS section. But what happens if we use the Hierarchy? Let's see.


How to Create the Hierarchy field?

Step 1: Open the PowerPivot window and click on the "Diagram View" from "Home" menu to view the table in diagram mode.

Step 2: Now I have select the Columns from the "tblSalesData" for creating a Hierarchy. From Image 1 I know that there will be 2 hierarchy need to create in this "tblSalesData". For the first one I need to select "Year", "Month" and "Date" by pressing and holding the Ctrl key and Left Mouse Click.

Step 3: Right click on selected fields and select "Create Hierarchy".

Step 4: After clicking on "Create Hierarchy" the selected 3 fields will show under new field "Hierarchy1" as below:

Image 2: Hierarchy1

Step 5: Now rename the "Hierarchy1" (by double clicking on it) as "TimeSeries" or as you wish and press the "Enter"

Step 6: If you wish "Date" field will play role in top and "Year" field will play role in bottom, then you can just click and drug the target field to the desire position.

Step 7: Again I need to create another Hierarchy for "Region", "Area" and "Territory" in the same way. Select the fields then right clicking on the selected fields and then select "Create Hierarchy" and rename it as "Geography".

Image 3: New Hierarchy field has created named "Geography"

Step 8: Now go back to Data View and activate the tblSalesData table. Click on "Home | PivotTable | PivotTable" from PowerPivot window and select "New Worksheet" and click on Ok. You will see the 2 Hierarchy fields are present in the PivotTable fields list.

Image 4: The 2 Hierarchy fields are showing

Step 9: Now simply drag the Geography field in ROWS section and TimeSeries field in COLUMNS section. Then from More Fields drug the Quantity field in VALUES section.

Image 5: PivotTable field settings with Hierarchy fields

Step 10: Click on + sign in PivotTable report to expand the hierarchy.

Step 11: Finally after few pivot design editing the report will looks like below:

Image 6: Final view of a sales report by using Hierarchy field

The findings is, if we used normal fields for report generating, then we need to use few fields individually in ROWS and COLUMNS section. But to get the same result, if we use Hierarchy fields, then we can generate the same report in short time.

Popular posts from this blog

How to display an image in worksheet based on a List or based on IF condition?

Excel can show image on worksheet based on a specific IF condition. So, how to do it? Simple follow the below steps: Step by Step: Step 1: Insert images in your Excel Worksheet. Here I've inserted 5 different types of balls, Football, Cricket, Pool, Basketball, Tennis ball. Note that, All balls are placed into different cell. These are placed in Picture sheet. Image 1: 5 balls placed in 5 different cells and covered photo's wide and height Step 2: In the report sheet, design the report as you wish. I've designed in my way like below: Image 2: Kids asking to Donald Duck, which ball need to throw now Step 3: Make a drop down list "Games" in E6 cell in Report sheet from Data Validation. which is as below: Football Cricket Pool Basketball Tennis You can do an IF function here in E6 in Report sheet, which will meet a certain condition and returned Football, Cricket, Pool, Basketball or Tennis. Step 4: Now the tricky part is

Fiverr Microsoft Excel 2016 Skill Test and Answers 2021

This video will help you about preparing Fiverr Excel Skill Test. I've just taken this Fiverr Excel Skill Test and successfully passed with a scored 6 out of 10. I'm sharing my Fiverr Excel Skill Test and Answers 2021 video so that you can prepare yourself if you would like to give a test on Fiverr.    I have taken the Fiverr Excel Skill Test on Fiverr and obtained 6 out of 10 scores. If you take a test and pass, it will greatly help the buyer to trust you and your skills. Please note that your exam will not be exactly the same as mine because there are many more questions in the pool than 40 which appeared in my test. But I am hopeful that you will succeed in it. If you have any queries, please write them in the comment section. I will try my best to guide you.Follow this video and try to get a general idea. By following the instructions, you can successfully pass the test.    After passing the Fiverr Excel Skill Test, Fiverr shared a Excel Expert Badge on my Profile, so that

Cumulative Closing Balance like a Bank Statement in PivotTable

A Bank Employee in many case needs to calculate the Closing Balance after each transaction in PivotTable like a Bank Statement . But with the help of Calculated Field of a PivotTable , you can only calculate Field with Field . It's not possible to use a formula in Calculated Field where you can mention a single cell with Relative Reference Cell . Because a PivotTable acts like a Table format where you can work with Field or Column Name . A Helping Column (A regular column, that helps to get a partial result where formula applied) can be a good idea. But there is an option in PivotTable by which you can Calculate Cumulative . In this article I will show you, how you can do it. Calculating with Formula: Assume that, you have an Excel file with Debit and Credit transaction of an Account . Image 1: Sample Bank Statement In a Bank Statement , Month wise Cumulative Balance is important. In the Excel sheet, as above, it is very easy to use a formula and calc