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 August 31st. Request your voucher.

Reply
tpcao
New Member

Need Help Calculating Variance Between Budget and Sum of Transactions Across Two Tables

I have two tables, a budget/prediction and an actuals table. I want a summary table that adds up all the transactions in the actuals table and compares it to the budget table to find the variance between the two tables. Please see below for an example data set.

 
Prediction Table   
Month IDDateGroupMonthly Value
1/1/2020A1/1/2020A1000
1/1/2020B1/1/2020B5000
2/1/2020A2/1/2020A8000
2/1/2020B2/1/2020B6000

 

Actuals Table   
Month IDDateGroupMonthly Value
1/1/2020A1/8/2020A350
1/1/2020A1/11/2020A200
1/1/2020B1/11/2020B755
1/1/2020A1/19/2020A430
1/1/2020B1/20/2020B3000
1/1/2020A1/23/2020A90
1/1/2020B1/29/2020B705
2/1/2020A2/1/2020A2560
2/1/2020B2/8/2020B340
2/1/2020B2/9/2020B270
2/1/2020A2/17/2020A4750
2/1/2020B2/22/2020B3600
2/1/2020A2/23/2020A300
2/1/2020B2/27/2020B1870

 

Summary Table   
Month IDPredictionActualVariance
1/1/2020A1000107070
1/1/2020B50004460-540
2/1/2020A80007610-390
2/1/2020B6000608080

 

Currently the two tables are connected with a one-to-many relationship by Month ID, with the Prediction table being the one and the Actuals table being the many. Can anybody help me with how to do this?

3 REPLIES 3
amitchandak
Super User
Super User

@tpcao , better to create two-dimension table Date(have a month there) and Group and join them with both facts.

 

For Group - https://www.youtube.com/watch?v=Bkf35Roman8

Date -To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
wdx223_Daniel
Super User
Super User

@tpcao the best way may be to create a date table and link these tables by date. but here is a solution just base on your two tables

wdx223_Daniel_0-1609807200246.png

 

I tried to use your solution, however when I tried to write out the DAX expression, when I got the Actuals portion of the summarize function, Power BI wouldn't let me choose those columns. I think I'll try yours and Amitchandak's suggestion and try joining by dimension tables and work from there.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.