Forum Discussion
NPV Not Aggregating / Summing from Month to Year Correctly
- 3 years ago
thanks.
so i think the problem is 2 fold.
Firstly I do believe the number to be 734639.0506839028 is correct, not $727,405. The issue with your measures (all the discount rate ones), all of them are set to currency with no decimal places. Because you are using the power of the 1+ Discount rate which is a decimal you are using a lot of the accuracy because you are rounding. So i set the discount rate to decimal places of 4, and when did that the sum of that table was correct in excel. However your totals are stilll not working properly.
second issue is that in order to get the correct total that is reflected when you sum it in excel, you need to iterate through each line to get your calculation ie
so I changed this calculation to this
Billings - Discount Rate =
SUMX (
VALUES ( Billings[Date] ),
DIVIDE (
Billings[Billings - No Discount Rate],
POWER (
SELECTEDVALUE ( 'Rates Table'[1 + Discount Rate] ),
[# of Days Divided by 365]
)
)
)not quite sure what you were trying to achieve with the discount rate final but please check what i have done in discount rate.
please see attached.
thanks.
so i think the problem is 2 fold.
Firstly I do believe the number to be 734639.0506839028 is correct, not $727,405. The issue with your measures (all the discount rate ones), all of them are set to currency with no decimal places. Because you are using the power of the 1+ Discount rate which is a decimal you are using a lot of the accuracy because you are rounding. So i set the discount rate to decimal places of 4, and when did that the sum of that table was correct in excel. However your totals are stilll not working properly.
second issue is that in order to get the correct total that is reflected when you sum it in excel, you need to iterate through each line to get your calculation ie
so I changed this calculation to this
Billings - Discount Rate =
SUMX (
VALUES ( Billings[Date] ),
DIVIDE (
Billings[Billings - No Discount Rate],
POWER (
SELECTEDVALUE ( 'Rates Table'[1 + Discount Rate] ),
[# of Days Divided by 365]
)
)
)
not quite sure what you were trying to achieve with the discount rate final but please check what i have done in discount rate.
please see attached.
Thank you! The Billings - Discount Rate - FINAL was doing pretty much what your new Billings - Discount Rate calculation is doing. It was iterating over the date with SUMX so that the monthly row values were accurate, along with the total. So afterall, there is no issue here - just with all the rounding occuing, it threw off what I was expecting. Thanks again.