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: 
kashjaniqlik
Contributor III
Contributor III

Expressions in dimensions

Hello

Hope I can explain this properly.

We have a bunch of bunch of expressions that we would like to use as dimensions and bunch of dimensions as expressions. The expressions are derived from our dataset and we would like to slide the dimensions based on the expression values if that makes sense.

For e.g.

We have CustomerA, CustomerB and CustomerC as fields in our table and orders as expressions. If we want to show expressions as dimensions on x axis i.e. say Orders 10-100, 100-1000 and so on and then show customer A, B and C in a bar graph stacked on y axis?

Has anyone loosely implemented this or point me to an article that does similar kind of things?

Thanks

3 Replies
sunny_talwar

I think you need two dimensions... 1st will be a Calculated Dimensionsand second dimension will be Customer. Then use your expression for what those bar seems to be plotting

jonathandienst
Partner - Champion III
Partner - Champion III

It is certainly possible, but the coding/expressions will be quite specific to your data model. If you upload a smalls ample qvw with representative data, you may get more specific and accurate help.

In general, though, your first (calculated) dimension would look something like:

If(Count(Orders) > 1000, Dual('1000+', 1000),

     If(Count(Orders) > 100, Dual('100 - 1000+', 100),

     If(Count(Orders) > 10, Dual('10 - 100+', 10),

     Dual('<10', 0))))


Customer would be the second dimension,

Sum(Sales) or whatever you need as a metric.


Duals allow for correct sorting of the groups in the calculate dimension. Sort numerically.

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