Skip to main content
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Making a histogram of counts of a dimension


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.



3 Replies
Not applicable

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.



= '>= ' & 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....


Champion III
Champion III

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.

Not applicable

Aha, I knew it existed!

Thanks John,