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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Subtraction of two dates to get aging problem

I seem to be having a problem with date fields.  I'm trying to set up an AR aging summary and my data is not showing up in the expressions I have set up.

I have an input field so the user can enter an 'AS of Date'

The variable for that is called vDate.

In my initial load I have the vDate defaulting to the system date.

LET vDate = (Today());

I have tried 2 different variations

In my table, I have the following expressions but they don't seem to be working:

=if(date($(vDate)) - date([Due Date]) <=10,sum([Balance in Trans Currency]))

=if(num($(vDate)) - num([Due Date])>=11 AND Num($(vDate)) - Num([Due Date])<=30,sum([Balance in Trans Currency]))

Any ideas on what my problem might be????

15 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Go to Settings-->Document settings-->Number tab-->Change the drop down to variables

then select the vDate variable then change the format.

Not applicable
Author

I made the change but still nothing.

Not applicable
Author

i can but that will take me a little while; have to leave out shortly.  i will post when i return.

Not applicable
Author

I have now attached the sample data and screenshots of what I have in qlikview.

MayilVahanan

Hi

     There is no data for last 30 days from today

sum({<[Due Date]={">=$(=date(vDate + 60,'MM/DD/YYYY'))<=$(=date(vDate + 11))"}>}[Balance in Trans Currency])

Check this, You can find the result.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

There should be several buckets since this is aging:

1 - 10 days

11 - 30 days

31 - 45 days

46 - 60 days

over 61 days

so all my data should fall under the over 61 days column but it is not showing anything.