Rounding problem in question

#1

Hello,

In past versions it was working correctly, and now we see long decimal number… See picture:


We tested now on v0.29.3 and v0.32.5…
Any ideas how to solve that?

Lukas

#2

Hi @LukasRa
If you go to the settings Data-tab and click the :gear: of field, how does your formatting settings looks like?
I have not been able to reproduce what you’re seeing, so I’m not quite sure what’s going on.
What if you click the “Reset to defaults” and then redo the settings, does that fix the problem?

#3

Hello,

this is how it looks on our system:



Also it shows values less than “minimum slice”…

#4

@LukasRa
For some reason it looks like the field sum is treated as a string, which is why none of the formatting is working.
Which database are you querying? Is it a Custom or Native query?
Also, upgrade to 0.32.8, since it fixes multiple other unrelated issues.

#5

We are using PostgreSQL.
Its a custom question, and sum field is sum of number:

#6

@LukasRa
It’s the first time I’ve seen this issue, so not sure what’s going on.
What’s the Field Type of pard_kiekis? Admin Settings > Data Model > (database) > (table) > (column) :gear:
What’s actual database column type of pard_kiekis - it looks like it’s a View, so maybe some conversion is going on?
You can check the actual result (to see if the return is a string or float) from the database in the browser developer console, under the Network-tab, select the request to show details, and then look in the Response-tab.

1 Like
#7

Thanks, you put me good track. It was “Category” and changing to “Number” solved the problem:

But, a problem is that it gets wrong field time, in PostgreSQL it is “Numeric”:
image

1 Like
#8

@LukasRa
There are cases, where you might want to Category, because you want a list of values in a dropdown.
Metabase would normally not set Category automatically for a numeric column, but maybe it was set incorrectly in an earlier version or something happened during the upgrade from 0.29.3
Without digging into your older metadata versions, then it’s difficult to know, but I’m glad it’s working.