Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
IF conditions are resource intensive, try using Pick Match functions.
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.
You can handle the same in Scripting as calculated dimensions are resource consuming