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
Anonymous
Not applicable

Time Weigthed Return (grouping)

Udklip1.PNGTWR beregning excel.PNGUdklip2.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-piga-msft 

 

I have solved the problem, but I do nor really understand why it works.

 

Instead of calculating the TWR as : TWR = productx(tabel1;TWR demin / yield-1) it function when im writing TWR =productx(VALUES(tabel1[date]; tabel1[TWR/yield-1])-1)

 

 

Power BI.PNG

As you can see, the yellow highligthed TEST TWR is exactly the number for TWR for the portfolio in highligthed with orange in the original post.

 

But instead of using TWR =productx(VALUES(tabel1[date]; tabel1[TWR/yield-1])-1)  I ended up using:

  

TWR Endelig = calculate(PRODUCTX(VALUES(tabel1'[Date]);tabel1[TWR/yield-1]);-sumx('tabel1';('tabel1'[TwrDenominator]))/sumx('tabel1';('tabel1'[TwrDenominator]))))
 
where -sumx('tabel1';('tabel1'[TwrDenominator]))/sumx('tabel1';('tabel1'[TwrDenominator])))) is instead of using -1, because when im using -1 I had some problem with the filtering in my tabel.
 
Hope it makes sense for you.
 
Thank you in advance! 

 

View solution in original post

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

I have a little confused about your scenario.

Is the orange table your desired output? 

In addition, is the grey table and the blue one your data sample? Are they in the same table or the different table?

If it is convenient, could you share your data sample as table format which can reproduce your scenario and your desired output so that I could have a test on it?

If I understand your situation correctly that you said the TWR is incorrect in Power BI, but the TWR demon/yeild is correct?

Best  Regards,

Cherry

 

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

Hi @v-piga-msft 

 

I have solved the problem, but I do nor really understand why it works.

 

Instead of calculating the TWR as : TWR = productx(tabel1;TWR demin / yield-1) it function when im writing TWR =productx(VALUES(tabel1[date]; tabel1[TWR/yield-1])-1)

 

 

Power BI.PNG

As you can see, the yellow highligthed TEST TWR is exactly the number for TWR for the portfolio in highligthed with orange in the original post.

 

But instead of using TWR =productx(VALUES(tabel1[date]; tabel1[TWR/yield-1])-1)  I ended up using:

  

TWR Endelig = calculate(PRODUCTX(VALUES(tabel1'[Date]);tabel1[TWR/yield-1]);-sumx('tabel1';('tabel1'[TwrDenominator]))/sumx('tabel1';('tabel1'[TwrDenominator]))))
 
where -sumx('tabel1';('tabel1'[TwrDenominator]))/sumx('tabel1';('tabel1'[TwrDenominator])))) is instead of using -1, because when im using -1 I had some problem with the filtering in my tabel.
 
Hope it makes sense for you.
 
Thank you in advance! 

 

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.