Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello,
I would like to make a table like Image 1 that shows the weighted average Yield to maturity for various portfolios. The data I am working with looks like the below image 2.
Image 1:
In Excel I use the formula =SUMPRODUCT(--(Days Remaining>0),Yield,Amount)/SUMIF(Days Remaining,">0",Amount)
basically the calculation is the sum of the products of yield % times the amount for each investment that hasn;t matured yet. Days remaining is also a calculation: [maturity date-Today()]
And each portfolio has it's own individual calculation, we just cell reference them on a different table to see them together.
The important part is that I only want to perform this calculation for maturity dates in the future, or in other words where days remaining is greater than 0
How do I recreate this formula in Power BI?
Image 2:
Thank you for your help
Solved! Go to Solution.
Thank you but this formula seemed to work to create a measure that could then be placed into a table
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Thank you but this formula seemed to work to create a measure that could then be placed into a table
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |