Group by: interval of 0.1 (decimal)

Hi all - just a quick check to see if I’m going mad, or have missed something.

In short, when using grouped by: is it possible to have a range that starts from a minus number and ends in a positive, with a decimal as the increment?


I have a set of data which are decimals (they represent percentages), so 0.7 = 70% etc.
I’ll be using the data for a graph but that doesn’t impact this part.

I’m using grouped by: to bucket the percentages, and count the number that sit within each.

Example raw data
-0.23
-0.21
0
0.2
0.1

Desired bucket count output:
-0.2 = 2
-0.1 = 0
0 = 1
0.1 = 1
0.2 = 1

This works as expected if I start the buckets from 0 and set the interval to 0.1 (But does not include negative values).

Or if I start from -1, I get no data if the interval is 0.1. But if I set it to 1, I do get the data expected. But for the percentage data it’s not that useful.

So it feels like it’s something to do with a negative starting value and decimal increment combined. Although a search and reference reading hasn’t given me anything concrete.

Here’s a shot of the data:
image

And here’s a shot of my expression:
image

And the grouping detail:

And here’s the output - just in a text box for easy debugging for now.
image

Thanks for taking the time to read, and if you have any ideas, I’ll be incredibly grateful!
Rob

Perhaps transforming the range from numbers to a text will allow you to group them without the negative number problem. Do not know if this affects other functionality you have that requires numbers.

Ah, a very good suggestion but as I’ll be using the data in a graph it requires numbers annoyingly.

Thanks for your thoughts though :slight_smile:

Try setting the type of grouping to exact instead of bucket…not sure if that will impact the way you want to group, or if it will allow for a negative starting value and a 0.1 interval, but my first guess as to how to get it to work.

Thanks! I tried this and a few other methods, but in the end I just went further up the chain and amended the data import process so that it comes in as 10 vs 0.1.

This topic was automatically closed after 70 days. New replies are no longer allowed.