Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following example:
AS_OF_DATE: 20170930
Total return: 2.5%
AS_OF_DATE: 20170831
Total return: 1,0%
AS_OF_DATE: 20170731
Total return: -0.5%
AS_OF_DATE: 20170630
Total return: 0.2%
AS_OF_DATE: 20170531
Total return: 1.5%
I want to make a selection with a Startdate and Enddate as a variable. Example:
Startdate: 20170630
Enddate: 20170831
By selecting the Startdate and Enddate the Total return must be calculated as follows:
Startdate: 0,2%
Enddate: 1.0%
Total return for this period= (1+1.0%)/(1+0.2%) -1 = 0,8%
So by selecting any Startdate and Enddate the total return should be calculated depending on the total return belonging to the Startdate and Enddate.with the above geometrical calculation.
Can someone give me an idea.
Thanks in advance for your reply.
Xandro
Perhaps this?
((1+ Sum({<Startdate = {$(VarSD)}>}Measure)) / (1+Sum({<Enddate = {$(VarED)}>}Measure))) - 1
Dear Anil
Thanks for your answer. Just to be sure. How can I create a variable for Startdate and Enddate. Could you explain this to me step by step (is this via the load scrip?).
What I try to achieve is, that by selecting a Startdate and Enddate via the Filterpane a KPI (Total Return) calculates the return of the two. (the returns are cumulative returns).
Thanks in advance for your reply
Xandro