Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
kashjaniqlik
New 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

Re: Expressions in dimensions

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

dsharmaqv
Contributor III

Re: Expressions in dimensions

MVP
MVP

Re: Expressions in dimensions

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
Community Browser