Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
New Contributor III

How to add multiple time zones to x-axis of chart?

Need to add IST, GMT and EST formats to show different time zones on x-axis.

9/11/17 Update:

trying to add an input box with the options: IST, EST, and GMT.

Time on the x-axis will then be calculated depending on the selection. To do so, I attempted to add a calculated dimension:


=ConvertToLocalTime(Hour,
  if(vTimeZone= 'IST','GMT+09:30',
if(vTimeZone= 'EST','GMT',
if(vTimeZone='GMT','GMT+05:00'))))


Note:

vTimeZone is a Variable

Hour is a field seen in the chart above already in EST.

This expression is not working- any ideas?

1 Solution

Accepted Solutions
Highlighted
New Contributor III

Re: How to add multiple time zones to x-axis of chart?

Correct code:

Note-

found out hour contained both numeric and string values

= ConvertToLocalTime( IF(IsNum(Hour), TIME(Hour),TIME#(Hour,'hh:mm')),

If(vTimeZone = 'IST', 'GMT+09:00',
If(vTimeZone = 'EST', 'GMT+00:00',
If(vTimeZone = 'GMT', 'GMT+05:00',
)))

)

View solution in original post

2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: How to add multiple time zones to x-axis of chart?

You can add one more time zone by creating an expression that calculates the hour (relative to EST, your x-axis) and using the "Text on Axis" display option for the Expression.

-Rob

Highlighted
New Contributor III

Re: How to add multiple time zones to x-axis of chart?

Correct code:

Note-

found out hour contained both numeric and string values

= ConvertToLocalTime( IF(IsNum(Hour), TIME(Hour),TIME#(Hour,'hh:mm')),

If(vTimeZone = 'IST', 'GMT+09:00',
If(vTimeZone = 'EST', 'GMT+00:00',
If(vTimeZone = 'GMT', 'GMT+05:00',
)))

)

View solution in original post