Greater than zero is showing some 0 in query design

Hi! I have found a strang behavior in LO Base query result. Attached is a sample DB to show the problem. I have transactions of customers payments for two months. Column ‘Fee’ shows the amount to pay. If a customer have to pay full amount, ‘Fee’ will multiply by 2. If some customer have to pay partial amount for one month like 60%, it will be multiply by (0.6 + 1). Now after getting the payment transactions and showing balances of customers, some have paid their full, so balance will be zero against them. When other have due amounts against them. Finally I want to show only the customers which have some dues.
So the ‘Due’ column criterion is set > 0. But strangely it hide some customers who paid their full amounts but show some of them as 0 balance. I checked and found that it shows only them who have partial payments like 60%. Even 50% is OK like 100%. Is it a bug? And is their any correction needed in query design to eliminate the problem?
Trial.odb

Maybe because partial payments or the sum of them was not properly rounded at two decimals , can suffer the problem of computer precision with decimal numbers having a periodic representation in binary.
Test rounded ‘Due’ in the criterion, or rounded the value when it’s written in the field.

OP can see this in result of Query2 if displayed calculated amount is formatted with 6 decimal places. It carries forward from there.

With Query4 as SELECT "St_ID", "Total Paid", "To_Pay", "Due Amount" FROM "Query3" WHERE round("Due Amount",2) > 0 seems to work as you expect.

Thank you! it is working. I always use ROUND to get an integer value from decimal. Here the result was already round so did not tried. I think as the data type is float so problem appeared. On integer data type may be not comes like that. But need decimal value here so float data type used.

@LO_user1,

You have closed the question as the question is answered, right answer was accepted but no answer was marked as the correct (or accepted) answer.

As you have been helped, please help others to know the question has been answered by clicking on the :heavy_check_mark: in upper left area of answer which satisfied the question.