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

Announcements
Join us in Zurich on Sept 24th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
PanchoVilla
Contributor
Contributor

Add balance in date range

Hello!

I need to add the last balance of each invoice and product in a range of dates.

I have a table with invoice date and payment date. Only invoices that meet the date range and payments that meet the date range should be considered.

In the image I show a little better the result I need to obtain.

 

Ejemplo Qlik Sense.png

 

I tried with this expression but it didn't work for me.

SUM(AGGR(FirstSortedValue({<
InvoiceDate={">=$(=Date(vMinDate)) <=$(=Date(vMaxDate))"},
PaymentDate={">=$(=Date(vMinDate)) <=$(=Date(vMaxDate))"}>}
CurrentBalance, -PaymentDate)
, InvoiceID + ProductID)
)

 

Greetings, thanks for your help.

 

 

Labels (4)
0 Replies