Tag Archive | RemoveFilters

Percent of Column Total

We want to calculate the percentage contribution of the columns. In our example the we want to calculate the percent contribution of gender across Department.

Our Data Model contains three tables Department, Gender and Emp_data.

The dimension tables are Department and Gender. The fact table is the Emp_data table.

  • The Department table has a list of all the available departments in our dataset
  • The Gender table has a list of all the available gender categories in our dataset.
  • The Emp_data table has details for all our active employees. We have details like the department, gender, grade, designation, joining date , country and many more data.

The Department table and the Gender table are connected to our Emp_Data table in a one to many relationship.

What is Percent of Column Total

The below table gives us the count of employees across Department by Gender

E.g Gender : Female

We have a total  of 4463 female employees and the breakdown of female employees by Department

For percent of column total we need to find out the % values of female employees across Departments. The sum of all the values needs to be 100%

Our result must be as under:

What the above tables states is that in Female Gender.

  • Customer Service accounts for 21% female employees,
  • Finance & Accounts accounts for 13% female employees,
  • Human Resource accounts for 6% female employees
  • And so on……….

The Total is 100% for females.

Similarly for Male employees , we get the %breakdown for male employees by Department.

And similar for Undisclosed Gender.

To achieve the below we need to calculate three measures

Calculate the headcount in our dataset. Create a new measure. Name it as Headcount .

Next we need to calculate the Column total. So we will create a new measure. Name it as Column Total.

As we want the % across Gender, we need to remove the filters across the Department.

Finally, we need to calculate the % of Percent of column total by dividing the headcount by the column total.

So create a new measure. Name it as Percent of Column Total. Format it as %.

Add a matrix visual to your report.

In rows add Department (from Department table). In columns add Gender (from Gender Table). In values add Percent of Column Total

The resultant matrix is our percent of parent column total.

To view a video tutorial. Refer below.