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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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