GroupBy double columns not unique values

Hi everyone, I am trying to apply the GroupBy node to a table using the ID column as Group Column and calculating the MAX number for column X,

But, the GroupBy node is giving me these results with one of the records


When I copy and paste the 111.112 into a text editor I found that the ID is storing a zero


So I guess that the software is not considering 111.112 as unique, but when looking at the GroupBy node they look identical.

I wonder if there is a way to make the numbers unique.

Thank you

PD. I have checked that the columns are Double type

Hello @salazachou
If your ID column is originally a String you can use ‘String to Number’ node and specify as Integer to the Output.

In the other hand, if your original data is a Double, you can use Math Formula, and specifying the output as Integer as well.

All these before the Group By happens of course.


Thank you, I guess that my problem is that my data is a combination of different sources.

I will try multiplying the ID with the math formula by one and see if that can solve the issue

Thank you

Hi @salazachou , the GroupBy will always give you the unique values of the combination of the columns you are grouping on. This behaviour usually happens when there is a “hidden” character that makes the data appear to be the same, but in reality it’s not, as you found out.

A couple of things you can do to test the data when you encounter these situations:
1-You can use the Duplicate Row Filter node and see if you get the same results (it will only confirm that GroupBy is working as expected)
2-You can concatenate some dummy values before and after your text to see if there is anything there. For example, you can run this in the String Manipulation:
join("XXXX", $ID", "XXXX")

So, you would see this result as an example:


It’s basically avoiding you having to copy and paste in notepad :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.