Discussion Board for collaboration on QlikView Scripting.
I have fields:
1) Division - OIS, PPP
2) CM_RT_Time - 0:00:42, 0:03:05, .............
3) Model Mapping - Big Machines, Small Machines
4) Flag - Metro, Remote-1, Remote-2
Out of these, I have to create Buckets. The Buckets are created on the basis of Hours.
I've created the Buckets using AVG(CM_RT_Time) but facing some issues.
See the Snapshot for the requirement:
Need Script or Expression for it.
What is the needed UI output you want
Somewhat Like this:
I need the Buckets to get changed on specific Selections.
Any Suggestion guys???????????
Try like this
if(Hrs >= 0 and Hrs <= 2 , '0-2 Hrs',
if(Hrs >= 2 and Hrs <= 4 , '2-4 Hrs',',
if(Hrs >= 4 and Hrs <= 6 , '4-6 Hrs',)) as Hrs
To create regular clusters you could use the function class(). Unregular clusters are also possible but the effort is higher because then it will be some if-loops within the function needed.
Easier is often to use a mapping with applymap(). Therefor you needed only a round function or a similar logic to create fixed values then a greater or less then isn't possible:
Mapping Load * Inline [
0, 0-2 Hrs
1, 0-2 Hrs
2, 2-4 Hrs
3, 2-4 Hrs
applymap('HourMap', floor(Hrs), 'DefaultValue') as HrsCluster
Such mapping-tables are easily created in excel even if you have then 24 hrs.