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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Absalon29
Helper III
Helper III

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
v-yuezhe-msft
Employee
Employee

@Absalon29,

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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yuezhe-msft
Employee
Employee

@Absalon29,

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

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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