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
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
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.