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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Group axis expression

Hi,

I have a chart with a x-axis numbered from 1 - 200. Most every instance has a number of post related to it building different bars. Now I want to group the values in sets of 5. That is; I want the values 1-5 to be grouped, 6-10, 11-15, 16-20 and so on. This is only to relate to the x-axis. Ideas?

Cheers,

10 Replies
Jason_Michaelides
Partner - Master II
Partner - Master II

If your x-axis dimension is <Field>, then I think you could set your dimension to be Ceil(<Field>/5)

Hope this helps,

Jason

Not applicable
Author

im not really sure if i get what your're trying to tell me here. i only get the axis to divide by 5 not group the values as i wanted... could you perhaps explain your function more in detail?

cheers

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Try

=Class(Field, 5).    Play around with the 3rd (optional) parameter if you would like to change how it appears.

You could also use

=Num(Class(Field, 5))  

This will display the bottom number of the class, but will correctly group the data

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

ok, where would i put this expression? in the dimension calculation directly? currently i am using an expression there to sum up the values as:

=today()-received_date

is this the one im suppose to change?

jonathandienst
Partner - Champion III
Partner - Champion III

A calculated dimension...

If you post a sample containing the chart your would like modified and some data (scrambled if confidentiality is required), then I could be more specific.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

here is a sample of my work. lets say i wan tto group the values on the x-axis in sets of 50. the first being 1450 - 1400; then 1400 - 1350; 1350 - 1300 and so on...

jonathandienst
Partner - Champion III
Partner - Champion III

Is this what you want? I have made the band dynamic so the user can set the band size as required.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

tnx! this seemed to do the trick! excellent!

Not applicable
Author

one more thing, the values are now grouped in the graph, i will need them stacked. is this possible with the vBand function`? If i want to change the static min max on the x-axis to only show me values between 1400 and 1200 I would want the bar to show up individually, not stacked - how do i do that?