Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with Max Visible property

I have a chart that I want to be able to display as a straight table or a bar graph. The problem is to do with the Max Visible Number property.

If I set it to a particular number, in the straight table it does what I would like it to do - that is, it shows a table with the appropriate number of rows, and if there are more rows than sensibly fit into the chart size, it provides me with a scroll bar. But importantly, the number of rows still is the number of items that I want to show.

Unfortunately, the bar graph behaves differently. If I set it to a small number that will fit within the boundaries it works fine. If I make it larger, but do not enable the scroll bar, it becomes formatted incorrectly, and you can't see all the labels. And if I enable a scroll bar, then it shows me in within the boundaries of the object the number of rows that I want, but the scroll bar now enables me to scroll to the other items in the list that I didn't want to display.

Is there anyway to make the bar graph behave the same was as the straight table?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Strange. I'd have thought that would work, but it doesn't. I wonder if it's a bug or working as designed.

And then I'd have thought it was as easy as changing your expression to something like this:

if(rank(expression)<=100,expression)

Since it would return null for everything after the first 100, which should then be automatically suppressed. But it isn't being suppressed. It appears to have something to do with the rank() function. If I make the expression rand()>.99, the zero rows suppress just fine. If I make the expression rank(rand())<100, the zero rows show. I wonder if it's a bug or working as designed.

OK, my final approach appears to have worked. Use a calculated dimension like this:

if(aggr(rank(expression),dimension)<=100,dimension)

The number in the expression above is how many rows you want TOTAL. Then set the max number visible to, say, 10, and enable the scrollbar. You should be able to see only 10 bars at a time, but can scroll through the top 100 bars. You can't scroll any farther than that.

View solution in original post

3 Replies
johnw
Champion III
Champion III

Strange. I'd have thought that would work, but it doesn't. I wonder if it's a bug or working as designed.

And then I'd have thought it was as easy as changing your expression to something like this:

if(rank(expression)<=100,expression)

Since it would return null for everything after the first 100, which should then be automatically suppressed. But it isn't being suppressed. It appears to have something to do with the rank() function. If I make the expression rand()>.99, the zero rows suppress just fine. If I make the expression rank(rand())<100, the zero rows show. I wonder if it's a bug or working as designed.

OK, my final approach appears to have worked. Use a calculated dimension like this:

if(aggr(rank(expression),dimension)<=100,dimension)

The number in the expression above is how many rows you want TOTAL. Then set the max number visible to, say, 10, and enable the scrollbar. You should be able to see only 10 bars at a time, but can scroll through the top 100 bars. You can't scroll any farther than that.

Not applicable
Author


John Witherspoon wrote:
Strange. I'd have thought that would work, but it doesn't. I wonder if it's a bug or working as designed.
And then I'd have thought it was as easy as changing your expression to something like this:
if(rank(expression)<=100,expression)


Yes, strange; I also thought this should work.

Can anyone remember if this worked in previous versions?

Best regards
Stefan



Not applicable
Author


John Witherspoon wrote:
OK, my final approach appears to have worked. Use a calculated dimension like this:
if(aggr(rank(expression),dimension)<=100,dimension)
The number in the expression above is how many rows you want TOTAL. Then set the max number visible to, say, 10, and enable the scrollbar. You should be able to see only 10 bars at a time, but can scroll through the top 100 bars. You can't scroll any farther than that.


Great! That seems to have worked perfectly.