Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
jjvicenza1930
Contributor II
Contributor II

How to calculate performance with a startdate and enddate

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

2 Replies
Anil_Babu_Samineni

Perhaps this?


((1+ Sum({<Startdate = {$(VarSD)}>}Measure)) / (1+Sum({<Enddate = {$(VarED)}>}Measure))) - 1

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
jjvicenza1930
Contributor II
Contributor II
Author

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