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

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