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

Calculating a value using data in two separate columns

I have two models - Index and Porfolio. I need to calculate the difference in weightings between the two. The models have a relationship based on the unique identifier (ISIN). There is also a relationship to a date table. Both models have ISIN numbers, Sector classification and weighting. The calculation is simply Portfolio Weight - Index Weight. I have tried using Lookupvalue to bring the Index Wt from the Index Model into the Portfolio model but I get the wrong answer. Can you suggest a solution - attached is a link to the test file https://1drv.ms/u/s!AiRs1BCuVWhM9DdsNuAEJUXfWZe7 

 

 

model error.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous,

In your PBIX file, I find that you create one-many relationship uising ISIN field between the Index table and Porfolio table. However, the Index table doesn't contain all the ISIN records of Porfolio table, you can review the following table visual. This is the reason why you don't get correct value of  Portfolio Weight - Index Weight.
2.JPG

But for those match ISIN records, you can get correct number for  Portfolio Weight - Index Weight.
1.JPG

Regrads,
Lydia

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous,

In your PBIX file, I find that you create one-many relationship uising ISIN field between the Index table and Porfolio table. However, the Index table doesn't contain all the ISIN records of Porfolio table, you can review the following table visual. This is the reason why you don't get correct value of  Portfolio Weight - Index Weight.
2.JPG

But for those match ISIN records, you can get correct number for  Portfolio Weight - Index Weight.
1.JPG

Regrads,
Lydia

Anonymous
Not applicable

Hi Lydia, 

 

Thanks so much for your help. Makes perfect sense and apologies that I didn't spot the error in my data. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.