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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ageing Debt using a Variable

Hi All

I have created a variable (vDate) in which I can enter a specific date, i.e. the last date of the current month, in an effort to forecast my debt ageing as at that date into a number of categories.

I have then entered the below into the script however everything is being returned as being in the category "Greater than 120 Days", where am I going wrong?

thanks in advance

Iain

     IF(('vDate' - [CLE.Document Date])<=30,'0 - 30 Days',

    
IF(('vDate' - [CLE.Document Date])<=60,'31 - 60 Days',

    
IF(('vDate' - [CLE.Document Date])<=90,'61 - 90 Days',

    
IF(('vDate' - [CLE.Document Date])<=120,'91 - 120 Days','Greater Than 120 Days')))) as [CLE.InvoiceAged Band Variable],

Labels (1)
1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You're using a literal string: 'vDate' . Try vDate without the quotes or $(vDate). Make sure vDate contains a real date and not a string or you won't get a number of days back when you subtract CLE.Document Date from it.


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You're using a literal string: 'vDate' . Try vDate without the quotes or $(vDate). Make sure vDate contains a real date and not a string or you won't get a number of days back when you subtract CLE.Document Date from it.


talk is cheap, supply exceeds demand