Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field that has Nrs in it
Total
75
200
250
320
155
I am trying to build a chart where the dimension is a range
like the bar chart will show as follow
bar one is <100 and the sum is 75
bar two is (>=100 and <= 250) and the sum is 605
bar three is >300 and sum is 320
Anybody knows what should be the dimension for that or If I have to do that in the script then what should I type.
Thanks for your help.
You can use a calculated dimension in your chart:
=if( FIELD <100, '<100',
if( FIELD <=250, '>=100 and <=250',
if( FIELD >300,'>300')))
and as expression
=sum(FIELD)
Maybe even better would be to calculate a new field in the script:
LOAD
FIELD,
if( FIELD <100, '<100', if( FIELD <=250, '>=100 and <=250', if( FIELD >300,'>300'))) as CLASS,
...
FROM ..;
Then use that CLASS field in the chart.
[Note that your CLASS has a gap between 250 and 300]
And if your classification bins are equally wide, you could also use QV class() function.
Hope this helps,
Stefan
You can use a calculated dimension in your chart:
=if( FIELD <100, '<100',
if( FIELD <=250, '>=100 and <=250',
if( FIELD >300,'>300')))
and as expression
=sum(FIELD)
Maybe even better would be to calculate a new field in the script:
LOAD
FIELD,
if( FIELD <100, '<100', if( FIELD <=250, '>=100 and <=250', if( FIELD >300,'>300'))) as CLASS,
...
FROM ..;
Then use that CLASS field in the chart.
[Note that your CLASS has a gap between 250 and 300]
And if your classification bins are equally wide, you could also use QV class() function.
Hope this helps,
Stefan
Thank you much!