Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Account Ageing

Hello,

I would like to do some ageing 30, 60, 90+.

I created a script with a where clause which looked similar to the following:

LOAD fields

SQL SELECT fields

FROM

WHERE field Date BETWEEN addmonths(today(),-1) and today();

This however doesn't work, it doesn't recognise the functions. I then created a variable and included it into the WHERE clause but this didn't work either. Any help to this problem would be cool.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

John,
You're makinga a typical mistake trying to use QV functions (in this case addmonths and today) in SQL SELECT. You can use QV functions only in LOAD. For example:


LOAD
...
WHERE Date>=addmonths(today(), -1) and Date<=today();
SQL SELCT
...
FROM ;


View solution in original post

2 Replies
Anonymous
Not applicable
Author

John,
You're makinga a typical mistake trying to use QV functions (in this case addmonths and today) in SQL SELECT. You can use QV functions only in LOAD. For example:


LOAD
...
WHERE Date>=addmonths(today(), -1) and Date<=today();
SQL SELCT
...
FROM ;


Not applicable
Author

Thanks mate, works