Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
joybratas1
Contributor II
Contributor II

Dynamically Limit Range of X axis of a bar chart to 10 Bars

Hi Community, 

I may be missing something but all I want is to limit my bars in bar chart to a specific number eg- 10 bars. But the entire range should cover. 

I have a class function to get the range I am using -

Class(field, variable) 

Where

variable= Round(max(field) -min(field)/9). 

This works fine when no filters or any bar is selected. As soon as a bar is selected the new chart shows more than 10 bars. 

Please help. 

Labels (1)
2 Replies
deepanshuSh
Creator III
Creator III

Maybe, try like this, create a fielf of rowno () and then use the count(rowno())=10, in set expression for getting the required result. 

Trial and error is the key to get unexpected results.
joybratas1
Contributor II
Contributor II
Author

The 'field' column is numerical. So do you want me to use rowno()