Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a number value in my QlikView load.
I'd like to create a histogram of this value, but I'm not sure how to configure the dimension.
I know the expression will be count(value) but I'm not sure how to set up the intervals of the dimension.
Thanks,
Rich
Hey Rich.
If you're happy to make an extra field in the script then you could use some combination of the numerical and text operators to "name" the category.
EG ceil and floor round up and round down respectively.
load
Field1,
= '>= ' & floor(Field1,5) & ' and < ' & ceil(Field1,5)
Would result in categories that are listed ">=0 <5 ", ">=5 <10" etc. What functions you use depends on the exact limits of categories you want.
The script would be the best place to create this field, you could of course put the function into the dimension of a chart and it would do the same thing.... but potentially crunch some memory.
I could swear that there is a function in qlikview that puts numbers into intervals automatically but I can't seem to find it, maybe I am getting confused....
Erica
It's the class() function.
Attached are some examples. One defines the distribution by standard deviations. One lets you set it with a slider. Another is hardcoded. I thought I had other examples, but these were the ones I found. I agree with Erica that as long as your ranges don't need to change, you'd be better setting them up in the script.
Aha, I knew it existed!
Thanks John,
Erica