Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
RichOB
Post Patron
Post Patron

Need help to calculate the variance

Hi, 

 

I have merged a budget and balance report but I now need need to show the variance in a column next to the budget.

 

Here's how the page looks:

BalBudge2.png

Here's a snapshot of the worksheet columns. The balance and budget are in the same column for merging purposes. Not sure if that matters. There are 25 different categories not just the "Contract Income" above:

 pbicolumns.png

Thanks in advance!

1 ACCEPTED SOLUTION

Is this what you were looking for? You can simply create a measure for Balance and another one for Budget and add them to the matrix table.

 

If this is the solution then please mark it accordingly.

 

Screenshot 2024-03-25 175546.jpg



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

View solution in original post

10 REPLIES 10
RichOB
Post Patron
Post Patron

thanks for your help, here's the table format:

 

Budgetpbi.pngbalancepbi.png

 

 

 

 

 

 

 

 

 

 

You attached screenshots again. Use the below:

Screenshot 2024-03-25 150018.jpg



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Ah sorry here you go

 

Scheme NameCategoryAmountQuarterType
Bridgend StepdownContract Income3053.22Q1Budget
Bridgend StepdownContract Income3053.22Q1Budget
Bridgend StepdownContract Income3053.22Q1Budget
Bridgend StepdownContract Income3053.22Q2Budget
Bridgend StepdownContract Income3053.22Q2Budget
Bridgend StepdownContract Income3053.22Q2Budget
Bridgend StepdownContract Income3053.22Q3Budget
Bridgend StepdownContract Income 3053.22Q3Budget
Bridgend StepdownContract Income 3053.22Q3Budget

 

Bridgend StepdownContract Income9159.68Q1Balance
Bridgend StepdownContract Income3053.23Q2Balance
Bridgend StepdownContract Income3052.23Q2Balance
Bridgend StepdownContract Income3953.23Q2Balance
Bridgend StepdownContract Income4610Q2Balance
Bridgend StepdownContract Income4610Q2Balance
Bridgend StepdownContract Income4610Q3Balance
     
     
     

Is this what you were looking for? You can simply create a measure for Balance and another one for Budget and add them to the matrix table.

 

If this is the solution then please mark it accordingly.

 

Screenshot 2024-03-25 175546.jpg



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

This worked perfectly, thanks for your patience and help! Rich

MNedix
Super User
Super User

Hi,

Variance of what-against-what? Balance-Budget or Balance Q1-Balance Q2 or something else? Do you have measures behind Balance and Budget or are they just labels? 



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Hi @MNedix 

 

It would be the balance figure minus the budget figure. There aren't any measures behind the balance and budget, I just named them that to differentiate what they are.

 

Thanks

 

 

Then a simple measure could probably do the job (replace 'Table' with your table):

 

Variance = 
VAR _balance = CALCULATE(SUM('Table'[Amount]),'Table'[Type]="Balance")
VAR _budget = CALCULATE(SUM('Table'[Amount]),'Table'[Type]="Budget")
RETURN
_balance - _budget

 

Then add the measure to the table visual. But keep in mind that this assumes that in Column Type you have both Balance and Budget (at least this is what I understood from your screeshot).

 

If this solved your problem pleae mark it as the solution.



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Hi @MNedix thanks for your reply. I've got the variance in the table now but it's coming up twice. Any ideas how I can change this to show just one on the far right column please?

 

Variancepbi.png

 

 

I don't really understand where the Amount and Variance Amount are coming from in the Values of your matrix. Can you paste your initial data in table format so I can try replicating your problem (you only put a screenshot)?



If the post helped then please give it a Kudos and mark it as the solution so others can see it.
Cheers,

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.