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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Relationship, SUMIF, VLOOKUP and SUBTRACTION

I need some help here as a Power BI beginner. We have 2 sets of data 'Actual' and 'Forecast'. Desired outcome is to calculate the variance between 'Actual' and 'Forecast'. Assuming it is Excel, Step 1 - Identifier is [Subregion]&[BU]&[SpendPoolLow] Could not create relationship between 2 identifiers due to duplicated rows in a file and each other contains identifier not existing in the other file. How to fix this in Power BI? Step 2 - SUMIF based on identifier in both files, and VLOOKUP Step 3 - Manually add in missing identifier in the outcome table, pull down SUMIF function for Actual, VLOOKUP the Forecast value again Step 4 - Subtract Actual from Forecast to calculate variance How to write DAX Step 2-4?
1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a calculated table as a bridge table to have a try.

Table = DISTINCT(UNION(VALUES(Actual[Identifier]),VALUES(Forecast[Identifier])))

Then we can create relationships like this.

rela.PNG

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Anonymous ,

 

To create a calculated table as a bridge table to have a try.

Table = DISTINCT(UNION(VALUES(Actual[Identifier]),VALUES(Forecast[Identifier])))

Then we can create relationships like this.

rela.PNG

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Anonymous
Not applicable

Screenshot of error on relationship.screenshot relationship error.png

Attaching the Power BI file... Truly appreciate your help!! Thanks in advanced.

https://drive.google.com/drive/folders/1F0Bu3ZXyNXdhNhJ6AC-elk3YzxmgkHYv?usp=sharing

 

 

Regards,

Joyce

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors