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: 
Not applicable

how to calculate ticket aging in qlikview

Here's an example of the data:

INV # INV. DATE AMOUNT

529721 3/1/2007 268,135.00

529828 3/2/2007 239,004.00

529829 3/5/2007 312,310.00

529841 3/21/2007 613,108.00

529845 3/29/2007 160,720.00

529846 4/1/2007 603,920.00

529847 4/13/2007 15,420.00

529848 4/19/2007 9,675.00


I am calculate the ticket aging in the above table. how to calculate ticket aging in qlikview.condition is ticket aging calculate based on today-1

anyone plz tell me....





5 Replies
JonnyPoole
Former Employee
Former Employee

Expression is just:   (Today() -1 ) - [Date]

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

LOAD

*,

Interval(Today() - 1 - [INV. DATE] , 'D') AS Age

FROM DataSource;

Hope this helps you.

Regards,

jagan.

Not applicable
Author

suppose my data in qvd format how to fetch the data plz explain me... and also write some script in the discussion form

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

LOAD

*,

Interval(Today() - 1 - [INV. DATE] , 'D') AS Age

FROM DataSource.qvd (qvd);


Note: DataSource with your actual qvd name.


or in Script window try loading the QVD by using Table Files button and locate your qvd file after that add this line to the generated script


Interval(Today() - 1 - [INV. DATE] , 'D') AS Age


Regards,

Jagan.

aveeeeeee7en
Specialist III
Specialist III

Hi

Use this:

Load *, Num(Today()-1)-Num([INV. DATE]) AS [Ticket Ageing] INLINE [

INV #, INV. DATE, AMOUNT

529721, 3/1/2007, '268,135.00'

529828, 3/2/2007, '239,004.00'

529829, 3/5/2007, '312,310.00'

529841, 3/21/2007, '613,108.00'

529845, 3/29/2007, '160,720.00'

529846, 4/1/2007, '603,920.00'

529847, 4/13/2007, '15,420.00'

529848, 4/19/2007, '9,675.00'

];

Snapshot2.png

Also, see the Attachment.

Regards
Aviral Nag