Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
count the pending time for the ticket in retail so I'm using below Code I got for 1500 results , Approximately 1000 correct and 500 wrong with negative value , the value should be positive also when I count the date in excel give positive , below example first two result are correct and rest two result wrong with negative value .
I didn't understand why Qlik give wrong calculation . please advice .
NoConcatenate
RetailData:
Load *, if((History_To_Val) = 'Retail Manager ', Interval(Previous(CREATED_History)-(CREATED_History),'DD')) as Pendingdays
Resident RetailData ;
Drop table RetailData;
History_Ticket_ID | CREATED_History | CREATED_BY_HISTORY | History_From_Val | History_To_Val | Pending ( Days ) |
243242 | 1/26/2020 15:10 | USER 2 | Support Team | Retail Manager | 0.10 |
243242 | 1/26/2020 17:38 | USER 1 | Retail Manager | Support Team | - |
243242 | 1/27/2020 14:57 | USER 2 | Support Team | Retail Manager | 2.99 |
243242 | 1/30/2020 14:42 | USER 1 | Retail Manager | Support Team | - |
243242 | 2/2/2020 15:10 | USER 2 | Support Team | Retail Manager | -8.77 |
243242 | 2/3/2020 11:50 | USER 2 | Retail Manager | Support Team | - |
243242 | 2/4/2020 15:09 | USER 2 | Support Team | Retail Manager | -0.59 |
243242 | 2/5/2020 20:04 | USER 1 | Retail Manager | Support Team | - |
243242 | 2/8/2020 15:06 | USER 2 | Support Team | NOC IT | - |
You need an order by statement within your load to ensure that the data are loaded in your wanted way.
- Marcus