cancel
Showing results for 
Search instead for 
Did you mean: 

Unequally sized intervals?

0 Kudos

Hi,

for a dimension it´s possible to create equally sized intervals. E.g. 10 intervals From 0 to 10.

However, it´s not possible to create unequally sized intervals, e.g. [0;1[   [1;5[   [5;7[   [7;10[

Does somebady have an idea how to achieve this?

Thanks

Andreas

Accepted Solutions (1)

Accepted Solutions (1)

TammyPowlas
Active Contributor
0 Kudos

Have you tried "Group by Selection" from the Prepare room?

0 Kudos

In general, I agree that I could achieve my request with the 'Group by Selection' function.

But I think this will not work for my use case.

Reason is: with Group by Selection you can only group values that are existing in a column.

Let´s say the lowest value is 0.6 and I want to put this value to the group [0;1[

Now, when I load new data and the lowest value will be 0.5, this value won´t be put into the group [0;1[ automatically, right?

varunanand
Contributor
0 Kudos

Hi Andreas,

In that case using a if(between the range) then (group 1) else (group 2) statement by creating a calculated measure/dimension will get you desired result.

Please let me know if there are any questions or comments.

Thank you,

Varun Anand

Answers (1)

Answers (1)

varunanand
Contributor
0 Kudos

Hi Andreas,

I agree with Tammy as group by selection will give you the flexibility to define the interval. If there are too many values to select, a simple if-then-else statement under custom calculations should get you the desired results.

Thank you,

Varun Anand

0 Kudos

Hi Varun,

I´ve create a calculated dimension "Back (ms) Intervals" in the following way:

if {Bck. (ms)} < 1000 then 1 ..... else 99

This worked fine.

Now, the values in column "Back (ms) Intervals" are numeric, i.e. 1 or 3 or 99.

Is it possible to have String values in this colum, e.g.

if {Bck. (ms)} < 1000 then "0-1s" ... else ">15s"

I get an error message when I try this.

Thanks

Andreas

varunanand
Contributor
0 Kudos

Hi Andreas,

Not sure why you are getting the error when using calculated dimension. Check the format as shown below,

You can also convert this dimension later to a measure and use it for visualizations.

Thank you,

Varun Anand

0 Kudos

Thanks Varun,

can you please check what´s wrong here?

varunanand
Contributor
0 Kudos

I think you are trying to update the formula of the previously (returns numeric) created dimension which is an integer. Can you try creating a new dimension and use the same formula.