As usually when trying to develop a certain new functionality or model, in QlikView™ or other software, I enjoy starting with a prototype that has a pretty simple set of data behind.

Some times I load this set of data using some short LOAD * INLINE , while in other occasions, when a data set with more cases is required, especially one that I am aware I will need to extend, I choose to have some Excel files/sheets as data sources.

**LOAD * INLINE [****Dimension****1****2****30****40****50****600****700****800****900****];**

We’ve started with the regular approach: a calculated dimension * CLASS (Dimension,BoundaryDistance) *and a pretty simple function in the expression:

*over a bar chart.*

**count(Dimension)**And this gave me a pretty easy to predict answer:

*to see what happens:*

**CLASS (log10(Dimension),1)**

**0<=Dimension**

**10<= Dimension****further, I’ve realized this is actually**

*10<=Dimension**=dual(*

*pow(10,floor(log10(Dimension),1))*

*& ‘<=x<‘*

*& pow(10,ceil(log10(Dimension),1))*

*,class(log10(Dimension),1, ‘Dimension’)*

*)*

All nice there with a small exception: the first interval seems pretty strange ! (1<=x)

**option within the**

*Continuous***Properties Tab of the chart and got this.**

*Axes*Now, looking at the last 2 figures, it’s clear where the problem of the first bucket is coming from: we are attempting to use ** log(o) **within the calculation steps of the first value within the calculated dimension.

But ** log(o) **is minus infinite and therefore the calculation is going wild !

*=dual(*

*if( pow(10,ceil(log10(Dimension),1))=1*

*, 0&'<=x<‘&10*

*,pow(10,floor(log10(Dimension),1))*

*&'<=x<‘*

*& pow(10,ceil(log10(Dimension),1))*

*)*

*,class(log10(Dimension),1)*

*)*

**, where I can keep the power of ten that we want to use for bucket wideness.**

*Variable1**=dual(*

*if( pow(10,ceil(log10(Dimension),Variable1))=1*

*, 0&'<=x<‘&10*

*,pow(10,floor(log10(Dimension),Variable1))*

*&'<=x<‘*

*& pow(10,ceil(log10(Dimension),Variable1))*

*)*

*,class(log10(Dimension),Variable1** )**)*

*Variable=1:*and like this for **Variable=2**:

*=dual(**if( pow(10,ceil(log10(Dimension),Variable1))=1*

*, **0&'<=x<‘& pow(10,Variable1)** ,pow(10,floor(log10(Dimension),Variable1))** &'<=x<‘** &pow(10,ceil(log10(Dimension),Variable1))*

*)** ,class(log10(Dimension),Variable1*

)*)*

**are:**

*Variable1=1,2 and 3***Final thoughts:**

- the calculated dimension option within QlikView™ is a pretty wild and powerful option, no doubt about it !
- using small data prototypes to start from is always a wise idea !
- try to “beautify” as much as possible your formulas and scripts ! (aka structure your code)
- CEIL and FLOOR are so valuable !
- saluting the LOG10() function. I kind of missed a LOG2() variation of this in some smart Gauge boundary limitations… (if anyone interested on this matter, let me know within a comment