Forum Discussion
ProductX Iterative Calculation
Hello,
I have a data set where I have the following information. I have a date column with dates by month. I also have a MTD return and a column that is the MTD Return +1. I want to create a measure which iterates the product of all of the MTD Return +1 from the start of the model up until the current date minus 1. I believe that this formula should work, but I am getting Infinity values. Does anyone know how to get this back on track? Thank you.
I have pasted a sample and the ITD Return has what should be the correct result.
| MTD Return | MTD Int | ITD Return | |
| Jan | 0.71% | 100.71% | 0.71% |
| Feb | -3.58% | 96.42% | -2.90% |
| Mar | -4.33% | 95.67% | -7.10% |
| Apr | 7.99% | 107.99% | 0.32% |
| May | 2.81% | 102.81% | 3.14% |
I have been using this formula.
- Anonymous6 years ago
Hi ARob198 ,
Create a calculated column as below:
ITD Return = PRODUCTX(FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])),'Table'[MTD Int])-1And you will see:
Or you can create a measure as below:
_ITD Return = PRODUCTX(FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])),'Table'[MTD Int])-1And you will see:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
5 Replies
- AnonymousNot applicable
Hi ARob198 ,
Could you pls update your sample data with [date] column?
For column MTD Int,the logic is 1+MTD Return,right?
But how to get column ITD Return?Can you advise me more about the details?
Best Regards,
KellyDid I answer your question? Mark my post as a solution!- ARob198
Helper IV
Hi Kelly Anonymous ,
The month is the date column. It is actually the month end date. ITD is the product of MTD Int for all periods <= date minus 1. So for example, Feb ITD is ((100.71% * 96.42%) - 1). March ITD is ((100.71% * 96.42% * 95.67) - 1). I am not sure why my formula is returning infinity. Do you know how I can fix this? Thank you so much!
Date MTD Return MTD Int ITD Return 1/31/2020 0.71% 100.71% 0.71% 2/29/2020 -3.58% 96.42% -2.90% 3/31/2020 -4.33% 95.67% -7.10% 4/30/2020 7.99% 107.99% 0.32% 5/31/2020 2.81% 102.81% 3.14% - AnonymousNot applicable
Hi ARob198 ,
Create a calculated column as below:
ITD Return = PRODUCTX(FILTER('Table','Table'[Date]<=EARLIER('Table'[Date])),'Table'[MTD Int])-1And you will see:
Or you can create a measure as below:
_ITD Return = PRODUCTX(FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])),'Table'[MTD Int])-1And you will see:
For the related .pbix file,pls click here.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!