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
juliliscarmo
Helper I
Helper I

TWRR -time-weighted return

Hello everyone,

I'm trying to do TWRR (time-weighted return) on Power BI. Therefore, the formula consists of two steps, first the increment value of two periods (+1), and then the product value of the increment.
I did the increment measure, but I can not use a measure in the PRODUCT formula.
Do you have any idea how I can solve this?

1.PNG2.PNG

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @juliliscarmo,

 

Maybe you can try to use below formula, I extend measure as column and add to variable table, then use this variable table and new column to calculate.

Product Increase =
VAR temp =
    ADDCOLUMNS ( ALLSELECTED ( Table1 ), "InCrease", [increase] )
RETURN
    PRODUCTX ( FILTER ( temp, [ID] = MAX ( Table1[ID] ) ), 1 + [InCrease] )

20.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @juliliscarmo,

 

Maybe you can try to use below formula, I extend measure as column and add to variable table, then use this variable table and new column to calculate.

Product Increase =
VAR temp =
    ADDCOLUMNS ( ALLSELECTED ( Table1 ), "InCrease", [increase] )
RETURN
    PRODUCTX ( FILTER ( temp, [ID] = MAX ( Table1[ID] ) ), 1 + [InCrease] )

20.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft it didn't work. Could you please send me the file you have made.
Thank you
Juli

Hi @juliliscarmo,

 

I attach it below.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you!

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.