Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Dimension

Hi,

I want to create Bar chart to show number of clients by Revenue?

ClientRevenue
C11000
C22000
C33000
C42000
C55000
C68000
C712000
C83000
C91000
C102500

I want the X axis (dimension) to be bucketed say 0-1K , 1-2K, 2-5K, 5-10K, >10K

How can I group the data to display the count of clients that falls with the dimension? The dimension could be dynamic (probably driven by slider)?

how can we make the dimension dynamic. Like user controls using a slider or so based on the Revenue amount. Basically I want the user to define the buckets on the fly. Any Ideas please ?

Appreciate your help

Thank you

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

As I've mentioned above.  You have a slider only for the variable b1 (upper border of the lowest bucket.  Define the variables for the other upper borders like this, for example:

b2 = b1*2

b3 = b1*5

b4 = b1*10

Actually it is not necessary to have multiple variables in this case - just use all this "*n" directly in the expressions.  See attached.

(But it is a deviation from your original request - you cannot control buckets independently with one variable)

View solution in original post

10 Replies
Anonymous
Not applicable
Author

Not sure that the slider is the best way - try the attached...

fred_s
Partner - Creator III
Partner - Creator III

Hi Dimple,

See attachment..

fred_s
Partner - Creator III
Partner - Creator III


Sorry Dimple,

In this case it's probably better to use the formula in your Charts Dimension,
See attachment

Not applicable
Author

Hello Mike Thanks for you reply

This is close to what I was expecting.  Can we use a single slider to control the min max range of several buckets ?

Not applicable
Author

Thanks Fred

Great Idea but we really wanted the user to control the range. It could be anything we dont want to prefix

Anonymous
Not applicable
Author

Single slider gives you one value of a variable.  If you are OK with calculating the borders of all five buckets based on it, you can use single variable.  Say, you set a variable to 1K, and calculate borders as Variable*2, *5, and *10.  In this case the borders are not independent, changing variable changes all bucket borders.

Five buckets - you need four or five variables to set the borders.

Or maybe I'm missing something(?)

Regards,

Michael

PS: from the presentation point of view, I'd rather use input box than sliders.  Don't like sliders...

Not applicable
Author

Hello Dimple,

I have modified fred's solution.

Create a variable "BucketRange". You can add one more variable for different bucket size in the dimension. Check Class functions syntex.

Dimension :

=class(Revenue,$(BucketRange),'Revenue')

Expression:

=count(Client)

Hope this is what you are looking for.

  D

Not applicable
Author

I understand slider may not be the good choice but it is preferred one.

Great if you could provide an example dynamic calculation of borders by variable

Anonymous
Not applicable
Author

As I've mentioned above.  You have a slider only for the variable b1 (upper border of the lowest bucket.  Define the variables for the other upper borders like this, for example:

b2 = b1*2

b3 = b1*5

b4 = b1*10

Actually it is not necessary to have multiple variables in this case - just use all this "*n" directly in the expressions.  See attached.

(But it is a deviation from your original request - you cannot control buckets independently with one variable)