Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

cluster bars by arbitrary number (for readability)

Hello. I have a bar chart with ~700 bars (please see attached). I would like to group them into groups (say of 10, or 25, or 50) to increase readability. I may cluster them in groups of n/10 to show deciles. Again, this is purely for ease of viewing.

From what I've read, clustering needs multiple dimensions. I tried adding a calculated dimension of =FLOOR(ROWNO(TOTAL),25) in order to get them into groups of 25. This formula doesn't calculate when it's a dimension. It works perfectly when I use it as an expression, but then I cannot use it for defining bar clusters.

Any suggestions?

For what it's worth, I'm much more comfortable on the scripting side of things rather than the layout/visualization side of things, so I apologize if this is an easy one that I'm missing!'

Thanks.

5 Replies
Not applicable
Author

bumping this in the hopes that someone has a suggestion

jagan
Luminary Alumni
Luminary Alumni

Hi,

Can you attach the sample? Try Class().

Regards.

Jagan.

sundarakumar
Specialist II
Specialist II

I would suggest a script level calculated dimension would work fine in this case.

1. create a field while loading the data as

ceil(rowno()/25) as clusters

2. when u reload u get a new field called "clusters" with value "1" for first 25 values, "2" for the next 25 and so on till the last row in ur table...

3. use this cluster as the dimension. in the bar chart..

4. u may even bucket them with some business rules like ascending order of sales(which can be done with a order by in scripting)

Hope this helps.

-Sundar

Not applicable
Author

Sundar,

Unfortunately, the bars below are calculated on the fly by taking value/average(other related values). The linkage is actually by a synthetic key that was formed using intervalmatch. Without destroying the intervalmatch-created bridge table, I can't flatten my data structure to the point where I can push the cluster number into the script (and thus, into the fact table).

I've basically given up on this... it doesn't look supported in Qlikview unless you can let the script do the heavy lifting.

I don't urgently need a solution; I'll leave this question marked unanswered in the hopes that a future QV release supports "arbitrary clustering".

Thanks!

sundarakumar
Specialist II
Specialist II

Please post a sample app in which u r facing the problem, so that we can try to find a solution.

-Sundar