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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
sifatnabil
Specialist
Specialist

Chart dimension taking too long to load

Hi,

I have a table with a field called "Time". It has hundreds of thousands of instances (but only around 2000 unique values). On a line chart, I want to show only 48 time values at a time no matter the selection (reason being is to show 48 intervals of 30 minute "Time" values, from 0:00 to 23:30).

However, I want to convert this to different time zones so in the chart dimension I used this:

=if(Region='EMEA',time(Time,'hh:mm'),

if(Region='APAC',time(Time+maketime(8,0,0),'hh:mm'),

if(Region='Americas',time(Time-maketime(5,0,0),'hh:mm'))))

However this hangs the QV document or takes too long to load.

How can I display only 48 values at a time and with the Region condition in the dimension?

I cannot create different time zone Time values in the script because the QVDs have already been created for many months now. So I would like the make the manipulations in the front-end.

3 Replies
alkesh_sharma
Creator III
Creator III

IF conditions are resource intensive, try using Pick Match functions.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Handling in script is the best solution, to overcome this change the script like below

LOAD

*,

=if(Region='EMEA',time(Time,'hh:mm'), if(Region='APAC',time(Time+maketime(8,0,0),'hh:mm'),

if(Region='Americas',time(Time-maketime(5,0,0),'hh:mm')))) AS TimeDimension

FROM Data.qvd;

Now use this field in charts, so this way you can avoid calculated dimension.

Regards,

Jagan.

Kushal_Chawda

You can handle the same in Scripting as calculated dimensions are resource consuming