Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

pschwegler003
New Contributor

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
b_knuever
Contributor III

Re: How to calculate and show debt by year.

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

Community Browser