I am not quite sure if this is exactly what you are looking for but I'll give you a couple options just in case:
The way I solved this is in the script:
Load * Inline
if(amt>0 and amt <5, 'a',
if(amt>5 and amt <13, 'b',
if(amt>13 and amt < 20, 'c',
if(amt>20 and amt < 30, 'd')))) as CustomRange
drop table Tab1;
Now the results are in tab2, keep in mind if you want 0-5 inclusive, etc... you will want:
if(amt>0 and amt <= 5, 'a',
if(amt>5 and amt <= 13, 'b',
if(amt>13 and amt <= 20, 'c',
if(amt>20 and amt <= 30, 'd')))) as CustomRange
Also if you didn't want the literals 'a', 'b', 'c', 'd' you could always replace them with 0-5, 5-13, etc... by:
if(amt>0 and amt <= 5, '0-5',
if(amt>5 and amt <= 13, '5-13',
if(amt>13 and amt <= 20, '13-20',
if(amt>20 and amt <= 30, '20-30')))) as CustomRange
I also attached anapplication for additional help if you need it.
But basically once you have the script the way you want it reload. Create a bar chart with a dimension of CustomRange and the expression =COUNT (CustomRange), and you should have something close to what you are looking for!
Hope this helps!
custom range.qvw 150.2 K
Add a second table :
Load * inline [begin,end,range
IntervalMatch (amt) load begin, end resident Tab2;
IntervalMatch match discrete values to intervals.
group range and fuzzy join.qvw 146.0 K