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: 
L_Hop
Creator
Creator

Daily Interest Calculation with User Selected End Date

Dear All,

I am trying to calculate (financing cost)interest with using two different tables.

Amount table has amount and due dates. Interest table has interest rates  and dates.

Interests should be calculated from due date till today if user not select any interest end date. (Users can select interest end date from the calendar object)

I have created variable to select end date, if no end date selection applied, today will be end date. Than used (vDueDateSelect)variable to sum interest rates. (This sums whole rates values from rate table!!)

sum({<[Date]={$(vDueDateSelect)}>}[Interest_Rate2]) 

I am having trouble to detect the interest start date(due date). If I link amount and rate table, I am able to get start date but this time not able to catch interest rate changes. This linking working as expected, if rate values will be same. 

I am also not able to use intervalmatch in script side because interest end values are not predefined.

How can I achieve this task? What should be the proper approach?

screenshot.png

Any help would be greatly appreciated!

Thanks in advanced.

L_Hop

1 Reply
thi_pham
Creator III
Creator III

I'm not sure I understand correctly your situation , but based on your sum statement, I propose:

=sum({<Interestdate={"=Interestdate>= DueDate and Interestdate <= '$(vDueDateSelect)'"}>} Interest_Rate2)

I changed some field name:

- Interestdate -> date(Date)

- DueDate -> Due Date R/P

This should give you sum of Interest_rate2 from the day of DueDate  R/P to selected DueDate.

Hope it helps