# How to Calculate Percentage of Two Columns in Power BI

In this Power Bi tutorial, we will discuss how to calculate percentage of two columns in Power BI, In addition, we will also learn how to calculate the percentage difference between two columns in Power BI.

## Power BI Calculate the Percentage of Two Columns

Here we will see how we can calculate the Percentage of two columns in the Power BI report.

In this example, we will use the below-mentioned Daily Rate sample data consisting of two sheets called Monthly Rate and Monthly Target to calculate the percentage value of two columns in Power BI.

Monthly Rate:

Monthly Target:

• Load data into the Power Bi desktop, Click on the new measure and apply the below formula to calculate the percentage value of two columns.
``````% Achieved =
VAR Month_Rates =
SUM ('Monthly Rate'[Rate] )
VAR Target_Rates =
SUM ('Monthly Target'[Target] )
RETURN
( Month_Rates - Target_Rates )
/ Month_Rates``````

Where,

1. % Achieved = Measure Name
2. Month_Rates, Target_Rates = Variable Names
3. Monthly Rate, Monthly Target = Table Names
• Select the table visual from the visualization, drag-drop the year, month, rate, and target fields from the field pane, and the created % Achieved measure value in it as highlighted below:
• To show Percentages change the format to a percentage by selecting Measure tools -> Percentage as highlighted below:
• The screenshot below displays the achieved percentage value based on the condition applied.

This is how to calculate percentage of two columns in a Power BI report.

## Calculate Percentage difference between Two Columns in Power BI

Let us see how we can calculate the percentage difference between two columns in Power BI,

In this example, first, we will find the difference value between the rate and target columns later we will use the Power Bi Divide function to find the percentage value.

Open the Power Bi desktop and load data into it, and use the below formula to calculate the percentage difference between two columns in Power BI,

``````% difference =
VAR MonthRate =  SUM ('Monthly Rate'[Rate] )
VAR MonthTarget =  SUM ('Monthly Target'[Target] )
VAR difference = MonthRate - MonthTarget
VAR Result = DIVIDE (differnce,MonthRate,BLANK())
RETURN Result``````

Where,

1. % difference = Measure Name
2. MonthRate, MonthTarget, difference, Result = Variable Names
3. Monthly Rate, Monthly Target = Table Names
4. Rate, Target = Column Names
• Select the table visual from the visualization, drag-drop the year, month, rate, and target fields from the field pane, and the created % difference measure value in it as highlighted below: