Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cluttered Y-Axis

Here is my problem:

I need to have a static step of 1 in order to prevent decimals from being shown on my axis, for my particular data set decimals don't make sense.

Thus, I have the static step box checked and set to one.

When I view the graph initially it has a step size of 5,000 ranging from 0 to 25,000. This all fits very well and the y-axis is uncluttered.

When I drill in, it becomes a step size of 1000 ranging from 0-17,000 due to the size of the graph, this makes the Y-axis cluttered and the numbers almost overlap.

Is there a way to remove the clutter when I drill in?

I have tried adding

Min ( Aggr ( Sum ( valuefield ) ))

Max ( Aggr ( Sum ( valuefield ) ))

To the static min and max fields, and this gives me the reverse problem. Now, my normal view is cluttered while the zoomed in view is uncluttered.

Any help you have on the subject is greatly appreciated.

1 Solution

Accepted Solutions
jedgson
Creator
Creator

Hannah,

I have not tested this but you could try the following.

Create a variable with the following

Max ( Aggr ( Sum ( valuefield ), [X Axis Field Name] ))


Then in the static step use this

If( $(Variable) <= 10, 1, If( $(Variable) <=100, 10, if( $(Variable) <= 1000, 100, etc...)))


Its not 100% flexible but should do the trick

View solution in original post

6 Replies
Not applicable
Author

Hi

a bit hard to follow your explanations, can you make the value an integer using floor, ceil or round?

Juerg

Not applicable
Author

Hey,

If you are a little bit more specific about what is confusing I can try to explain it better.

As far as flooring it goes, are you talking about somehow flooring my static step?

Thank you!

Not applicable
Author

Hi Hannah

I might have read your question wrong.

Is it correct that you get too many labels on the Y-axis in one or the other drill level?

You could probably call a macro on change of selection that will set a resonable static step for the new data range?

Regards

Juerg

Not applicable
Author

Yes, that is correct.

I've only been using Qlikview for a few days. Would it be possible for you to describe how to call the macro a little bit more?

Thank you.

jedgson
Creator
Creator

Hannah,

I have not tested this but you could try the following.

Create a variable with the following

Max ( Aggr ( Sum ( valuefield ), [X Axis Field Name] ))


Then in the static step use this

If( $(Variable) <= 10, 1, If( $(Variable) <=100, 10, if( $(Variable) <= 1000, 100, etc...)))


Its not 100% flexible but should do the trick

Not applicable
Author

I'll give that a try thanks.