How to create a chart with buckets? (small guide)
Small guide on how to create buckets in Targit using "user dimension" and "calculations".
This is the result we are aiming for. Show how many customers view a tarigt report "<= 2 times", ">2 and <=5 time", ">5 and <=10 times", "> 10 times".

If we take a closer look at the components used we can see the "user dimension" which will hold our custom buckets, the customers which we want to divide in buckets accordingly the number of times they viewed a Targit report.
First we start by adding a "user dimension". We wanted to have 4 buckets so we created 4 members in the user dimension without selecting any criteria.

In the next step we add as many calculations "type measure" as there are buckets in the user dimension.
We give them a proper name so we have an idea what they will be displaying

For each calculation you check if the "number of views" measure is lesser, bigger or between your bucket ranges as follows:


Now we have a separate measures and for the chart we of course need one measure to count the number of customers in each bucket. That is why we need to add a column measure as follows

The bucket id is a helper measure to count the rows, the "bucket total" will show the correct measure result depending on the "user dimension" member.
So using the "bucket id" measure we can now identify a row number per member of the user dimension.
The total measure will check on which row we are and will do a sum of all relevant bucket measures.
So on row 1 we want to have a sum of all the " bucket views <= 2" measures.
On row 2 we want to have a sum or all the "bucket views >2 and <=5" measures.
And so on.

If we did all this you will have something like this in the crosstab:
I masked the customer names in the image below with a fixed label. So in the actual data there are different customers of course

As you can see we still need to hide some stuff before switching to the chart presentation.
First hide the "bucket id" calculation which is just there for our information

Also we need to get rid of the customers. We can achieve this by hiding a range of this dimension. Define your range starting from the first element and ending on the last element.


And now we are ready to switch to a column chart and have the result we wanted to achieve.
You might have to add a dynamic label for each member in the user dimension to show the correct bucket label.
So "bucket1" will have a dynamic label "<=2 views", "bucket 2" will have a dynamic label ">2 and <=5 views", etc...







Please advise.
Comments
9 comments