Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get Days in Queue as another column


Hi,

I have to get Days in Queue as another column in straight/table box by using below formula

=DAYS360(TODAY(),Date)

I sit possible to get this in script?

CompanyItems:

LOAD ID,

    Name,

    ContactMethod,

    Portfolio,

    WorkItemType,

    Priority,

    Date;

SQL SELECT *

FROM CompanyItems

where Date between #01/07/2013# and #25/10/2013#;

11 Replies
javier_florian
Creator III
Creator III

You can try with follow script:

CompanyItems:

LOAD ID,

    Name,

    ContactMethod,

    Portfolio,

    WorkItemType,

    Priority,

    Date

    Datediff(day, Date, getdate()) ;

SQL SELECT *

FROM CompanyItems

where Date between #01/07/2013# and #25/10/2013#;

Datediff apply to SQL Server.

Not applicable
Author

Hi,

Thanks can you please explain a bit more as I have to show how many days the ID is in Queue with a column as

Days in Queue.

Actually my source is access database table

Gysbert_Wassenaar

CompanyItems:

LOAD ID,

    Name,

    ContactMethod,

    Portfolio,

    WorkItemType,

    Priority,

    Date

    interval(Today()-Date,'D') as DaysInQueue;

SQL SELECT *

FROM CompanyItems

where Date between #01/07/2013# and #25/10/2013#;


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks and it's working but when I am sending data to excel it is showing Days in Queue as

DaysInQueue

336:00:00

###############################################################################################################################################################################################################################################################

1488:00:00

216:00:00

1656:00:00

0:00:00

144:00:00

360:00:00

0:00:00

144:00:00

504:00:00

0:00:00

216:00:00

0:00:00

1512:00:00

48:00:00

624:00:00

144:00:00

168:00:00

-

0:00:00

24:00:00

-

24:00:00

24:00:00

1296:00:00

336:00:00

120:00:00

480:00:00

120:00:00

312:00:00

288:00:00

840:00:00

144:00:00

288:00:00

-

As I can formt cells as Number but I don't want my user to do again formatting as I have to send my user file means he/she can use that wothout alignment please can you help me how to set this.

And also is it possible to show minus values as in Red colour by using RGB?

javier_florian
Creator III
Creator III

Ooopss.. Wassenaar are right...

Amelia, If you work with access, try to get format to new field with format function.

Not applicable
Author

How to use format?

javier_florian
Creator III
Creator III

try with over your script:

num(interval(Today()-Date,'D'),'#0')

Not applicable
Author

Thanks and it's working and is there anyway to show number in RED colour if Days in Queue is less than Today number  for eg:

please see attached.

javier_florian
Creator III
Creator III

=If('Your_Date'<Today(),RGB(255,0,0),RGB(0,128,0))