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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Time issue

Hi guys ,

I have data source like this

Screenshot_1.png

I had used Gantt chart  for show jobs time duration like below image

PM1.png

I have given  an expression as =Max(endTime)-Min(Starttime)   and in Bar offset =Min(Starttime)

Its showing the data correctly  up to PM to PM time if the jobs runs Start time is 11:02 PM and jobs end in  2:06 AM  the chart  is not showing properly  so what kind of condition  i have to give if start time starts with PM and End with AM    could any one  Please  help me out from this scenario

Regards,

Vijay.M

Message was edited by: Vijay Malaisamy

1 Solution

Accepted Solutions
rodjager
Partner - Creator
Partner - Creator

Hi Vijay,

Nice start. The main issue is that your times cross days and your data does not appear to contain a date so you need to treat the times as intervals with an assumption that an interval is a day or less in size.

Therefore, to fix your gantt chart I would suggest the following:

1. Expressions tab: change your expression for Duration to test the times.  this would look like:

if(max(endTime) > min(Starttime),
max(endTime) - min(Starttime),
(1+
max(endTime)) - min(Starttime)
)

2. Axes tab: Uncheck the Static Max option and let QlikView work this out

3. Number tab: Set the format of Duration to Interval and then remove the TT suffix from the Format Pattern box to drop the AM/PM on the x axis.


Hope this helps.


Rod

View solution in original post

4 Replies
Anil_Babu_Samineni

Would you able to share sample

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

ya i shared the qvw file please check it

Anonymous
Not applicable
Author

Hi,

could  anyone give solution for this requirement,

Regards,

Vijay.M

rodjager
Partner - Creator
Partner - Creator

Hi Vijay,

Nice start. The main issue is that your times cross days and your data does not appear to contain a date so you need to treat the times as intervals with an assumption that an interval is a day or less in size.

Therefore, to fix your gantt chart I would suggest the following:

1. Expressions tab: change your expression for Duration to test the times.  this would look like:

if(max(endTime) > min(Starttime),
max(endTime) - min(Starttime),
(1+
max(endTime)) - min(Starttime)
)

2. Axes tab: Uncheck the Static Max option and let QlikView work this out

3. Number tab: Set the format of Duration to Interval and then remove the TT suffix from the Format Pattern box to drop the AM/PM on the x axis.


Hope this helps.


Rod