Power BI - 100% Stacked Chart



100% Stacked Bar Chart

The 100% stacked bar chart is used to aggregate the field values and the respective percentages of various field values are shown through multiple horizontal bars that exhibit 100% length on each bar. The X-axis displays the numerical values, while the Y-axis displays the categorical (text) values.

How to Generate 100% Stacked Bar Chart?

Step 1 − Open the BI desktop and load the "D:\Diabetes1.xlsx" dataset into it. You may observe the dataset in the Table view.

Generate the 100% Stacked Bar Chart

Step 2 − You can navigate to the Report View and selection of the "100% Stacked bar chart" visual has to be done from the "Visualizations" and you may either decrease or increase the visual size.

Generate the 100% Stacked Bar Chart 1

Step 3 − Now, place the "EmployeeName" field into the Y-axis and also drag the "bl_gl_level", "BMI", "Stage_HbA1c" fields and drop them into the X-axis one by one. Therefore, you can observe on the screen, that the sum of bl_gl_level, the sum of BMI, and the Sum of Stage_HbA1c by the employee names are populated on the canvas.

Generate the 100% Stacked Bar Chart 2

Step 4 − You may take the benefits of the "Small Multiples" section to further subdivide the generated 100% Stacked Bar Chart into smaller charts based on the field. For example, Place the Age field into the "Small multiples section". As you can notice in the screenshot, numerous charts are generated based on the Age field.

Generate the 100% Stacked Bar Chart 3

Step 5 − When we place the cursor on the data point, only limited information about the data fields is available in the message box. As you can notice in the screenshot, the details of "Employee Name" and "SUM of BMI" are illustrated.

Generate the 100% Stacked Bar Chart 4

If you wish to add more field information to the message box, then it can be done through the "Tooltips" option. Place the "Age" field into the "Tooltips" section. Moreover, the detailed information related to the "Age" field is appended to the message box when you hover over the specific horizontal bar.

Generate the 100% Stacked Bar Chart 5

Step 6 − What in case you want to view only Female/Male employees on the Report?

Filtration can be done on the generated visuals by using "Drill through". You may place the "Gender" field into "Tooltips" and click on the "Male" category.

Generate the 100% Stacked Bar Chart 6

Step 7 − You may customize the generated visual. Click on the Chart area and then navigate to the "Format Visual" and click on "Visual". You may turn on the "Data labels".

Generate the 100% Stacked Bar Chart 7

100% Stacked Column Chart

It is just the opposite of a 100% Stacked bar chart. The vertical bars whose elevation is 100% are employed in this chart. The X-axis displays the categorical (text) values whereas the Y-axis displays the numerical values.

Creating a 100% Stacked Column Chart

Step 1 − You may use the same dataset "Diabetes1.xlsx" to build a 100% stacked column chart. Now, you can switch to the "Report" View and select the "100% stacked column chart". The default visual build on the canvas.

Creating a 100% Stacked Column Chart

Step 2 − You may add the "EmployeeName" field to the X-axis. The next step is to add multiple field values in the Y axis for comparing field values against categorical value. After that, place the "Age", "BP", "BMI" and "bl_gl_level" field values in the Y-axis one by one.

Creating a 100% Stacked Column Chart 1

As you can see in the screenshot, each field is represented by a distinct color.

Step 3 − Suppose you wish to further divide the chart into multiple charts based on the specific criteria. It can be achieved through the "Small Multiples" section. You may place the "Diabetes" field into the "Small multiples" section.

Creating a 100% Stacked Column Chart 2

Therefore, you can notice on the screenshot, two different visuals have been created based on the Diabetes field. Note that the Diabetes field contains only 0 and 1 values.

Step 4 − If you hover over any vertical bar, only the EmployeeName and Sum of bl_gl_level field value information is populated.

Creating a 100% Stacked Column Chart 3

You can use the Tooltips section so that other field values information can also be viewed. For example, place the "Sum of Diabetes" into the "Tooltips" section. Moreover, once you hover over any vertical bar, the information of "Sum of Diabetes" is also populated. Similarly, you can add more fields into Tooltips to get their detailed information.

Creating a 100% Stacked Column Chart 4

Step 5 − With the aid of the "Drill Through" option, you can resolve queries like "How many employees have heart disease"" How many employees have diabetes or BP" and so on.

You may add the "Diabetes" field to the "Drill through", expand the "Allow drill through when:" and select the "Used as Category". You can select the 1.

Creating a 100% Stacked Column Chart 5

As you can visualize in the screenshot, only two employees have heart disease.

You may choose the "Format Visual" to customize this chart and alter the canvas settings, background information, font size, color, and so on.

Advertisements