Bar and column charts are some of the most widely used visualization charts in Power BI. They can be used for one or multiple categories. Both these chart types represent data with rectangular bars, where the size of the bar is proportional to the magnitude of data values.
The difference between the two is that if the rectangles are stacked horizontally, it is called a bar chart. If the rectangles are vertically aligned, it is called a column chart. This guide will demonstrate how to build bar and column charts in Power BI Desktop.
In this guide, you will work with a fictitious data set of bank loan disbursal across years. The data contains 3,000 observations and 17 variables. You can download the dataset here. The major variables are described below:
Date: Loan disbursal date.
Loan_disbursed: Loan amount (in US dollars) disbursed by the bank.
Gender: Whether the applicant is female (F) or male (M).
Purpose: Purpose for which loan was taken.
Start by loading the data.
Once you open your Power BI Desktop, the following output is displayed.
Click on Get data option and select Excel from the options.
Browse to the location of the file and select it. The name of the file is BIdata.xlsx, and the sheet you will load is BIData sheet. The preview of the data is shown, and once you are satisfied that you are loading the right file, click Load.
You have loaded the file, and you can save the dashboard. It is named PowerBI Visualization. The Fields pane contains the variables of the data.
To begin, click on the Clustered column chart located in the Visualizations pane. This creates a chart box in the canvas. Nothing is displayed because haven't yet added the required visualization arguments.
You can resize the chart on the canvas. The next step is to fill the visualization arguments under the Fields option as shown below. Drag the variable
Purpose into the Axis field, and
Loan_disbursed in the Values field.
The output above shows the Loan_disbursed by Purpose chart. You can format the chart under the Format tab. For example, if you want to add values to the chart, turn on the Data labels.
You can also increase the size of the X axis labels. Set the Text size to 12.
You can also adjust the title of the chart. Go to Title, and change the Font color, Alignment, and Text size arguments as shown below or as per your preference.
After making these changes, you will have the following column chart.
A clustered column charts is a type of column chart in which you compare two values side by side. In this case, you will compare the
Loan_disbursed values against two categories,
It is easy to make a clustered column chart by adding
Gender in the Legend position of the previous column chart.
If you have the column chart in the canvas, it is easy to convert it into a bar chart. Below is the Loan_disbursed by Purpose chart you created above.
Locate the Clustered bar chart option in the Visualizations pane as shown above, and click on it. This will convert the column chart into a bar chart.
To create a clustered bar chart, drag the
Gender variable into the Legend option.
Bar and column charts are used regularly in visualization to compare two or more values. In business intelligence, you will be required to build these charts for a variety of areas, such as finance, sales, marketing, production planning, geographical coverage, time series analysis, and many more. This is a great skill set to add because you will be using it regularly across sectors and organizational functions.
To learn more about building powerful visualization in Power BI desktop, please refer to the following guides: