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: 
kolov007
Contributor III
Contributor III

Calculation of debt for each date

In the attached document, the duty is only calculated correctly for the current date. But I need to display the debt and bed debt on each date. Can I do this? Help me please.Screenshot.png

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try expression with rangesum(), like:

Rangesum(Above(Sum(ZAKAZ_AMOUNT + AMOUNT_APPLIED)*if(DOC_DATE<= CurrentDate ,1,0),0, RowNo()))

View solution in original post

5 Replies
tresesco
MVP
MVP

Like in attached sample?

kolov007
Contributor III
Contributor III
Author

Your document is displayed the same debt for each date.

I have a need to see debt on each date. For example 17/04/2014 - 56 330, 24/04/2014 - 82 105, 08/05/2014 - 111 601.

Mark_Little
Luminary
Luminary

Hi,

i would probably change the script to mark the bad debt something like

     IF(ZAKAZ_DUE_DATE > Today(1), 1,0) As Bad

Then the set analysis would be something like below.

sum({<Bad={1}>}ZAKAZ_AMOUNT + AMOUNT_APPLIED)

Mark

tresesco
MVP
MVP

Try expression with rangesum(), like:

Rangesum(Above(Sum(ZAKAZ_AMOUNT + AMOUNT_APPLIED)*if(DOC_DATE<= CurrentDate ,1,0),0, RowNo()))

kolov007
Contributor III
Contributor III
Author

Thank you to everyone.

Mark Little, I think you mean sum({<Bad={0}>}ZAKAZ_AMOUNT + AMOUNT_APPLIED).

The formula works correctly with a value 0.