Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I need some assistance creating a measure to calculate YTD Time-Weighted Return ("TWR")
To simplify as much as possible, the user will be able to filter by any number of months in the year but will always choose contiguous months and will always start with Jan.
Ex. Jan
or Jan & Feb
or Jan & Feb & Mar, etc.....so YTD.
I have "Return" as a measure that is correctly calculating at a per month basis.
I need the time-weighted return ("TWR") to calculate through the max month selected.
In the example below,
if the user selected Jan, Feb, Mar, the TWR = 4.34%
if the user selected Jan, Feb, Mar, Apr, May, the TWR = 3.14%
Any update on this?
add colnum
Return+1 =[return]+1
Measure:
var maxMonth = max([month/year])
return
calculate(
product([return+1]),
Filter(ALL/ALLSELECTED([month/year]),[month/year]<=maxMonth)
)
-1
Your measure will not work as is since "Product" requires a column.
"Return" is not a column in my dataset. The key identifies it as a measure and it needs to stay as such.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
9 |