Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
pschwegler003
Contributor II
Contributor II

How to calculate and show debt by year.

Hi Community,

I would like to create a line chart which shows the debt over the years.

My data is as follows:

Debts

DATE, DESCRIPTION, AMOUNT

31-12-2015, Debt I, 10.000

Debt repayments

DATE, AMOUNT

31-12-2015, 1500

31-12-2016, 1300

31-12-2017, 1100

31-12-2018, 900

31-12-2019, 700

Expected result:

debt 31-12-2015 = 10.000

debt 31-12-2016 = 8.500 (10.000 minus 1.500)

How do I have to make this to put it in a line chart?

Thank you in advance!

1 Reply
bramkn
Partner - Specialist
Partner - Specialist

in the load script create an extra field named something like totalamount with the value of amount + previous(amount)

in the chart you can then use debt - totalamount