Informatiom Multiplies by 10

Hi guys,

I’m working in a project where I am using MongoDB hosted at mlab.
When asking questions about the “tabels” to create a new visualization of a certain information(in this case total_user per mission Name) it multiplies the number of user by 10. For example, if I have a mission which has 3 users, and I want to create a bar chart where x is misison name and y is Total_uses, it shows that I have 30 users in that mission.
Another strange thing is that if i put my mouse on top of the bar It will say I have 3 users, while in the y axis it says 30. This influences the way I can put information, because if I check the box to make the values auto in the axis it will put really hight values and the chart will be really small. As for the pie chart it just crashes.

Any tips on how I can fix this? Is this a bug or I have I done something wrong?

Thanks to all

Version, screenshots etc?

Version: v0.32.0

Hi @joao.p.costa
From the looks of it, it looks like either the data is not an integer, but something like a string, or you might have done some formatting on the card?
What happens if you try to create a new question and re-doing the visualization and card?
By the way, 0.32.2 was released, which fixes a few bugs since 0.32.0

I checked the data and the what I’m using is indeed an integer.
Meanwhile I downloaded the new version and the bug is still there.

@joao.p.costa
Go to the Data-tab and look at the formatting options there.
Also, what’s the Field Type set to in Settings > Admin > Data Model > (database) > (table) > (column) :gear: ?
It’s very strange that it shows 02 instead of 2.
Does it also happens when you use Native Query (SQL) instead of the Query Browser?

I went to the data model in settings > admin, checked the tables and columns in my database and some columns, like total_users and total_alerts are typed as income > dolar.

@joao.p.costa
Okay, I think we have to look in the response data to see what’s going on.
In the browser developer console, click the Network-tab, then in the Metabase question you click Refresh so the request is being made again, and you should see the request in the console, select the request and click Response-tab in the details pane.

I can see the response data, and like I guessed, the data is wrapped in quotes, so it’s treated as a string.
The row Hello is treated as integer, but all the others are treated as strings.
Not sure if this is a Metabase issue or Mongo issue - I don’t use Mongo, so you would have to do tests to figure out, where the problem comes from.

It’s true, the hello mission is an integer and all missions are once they are created, I have another program where I can put users into each mission, and as soon as I assign someone to that new mission it automatically changes to 20. Imagine I assign one extra person to mission hello, the total or user would be 2, but it will show 20 and will treat the information as a string.

… something

Your base type is type/Text for the 4 columns almost in the end. Pretty sure that’s your problem.
Make sure you return numeric data.

I was able to fix the bug, the columns were indeed strings. I will have to try to delete the post now. But Thanks so much for your help!

@joao.p.costa
Too bad that you decided to edit your posts, so no one else can learn from similar problem.
Well, they can click the :pencil2: in the top corner of each post to see the original contents.
That’s not how the internet works best - think of how many times you’ve searched Google for a problem and usually found the answer right away - that’s only possible because of questions and answers were left intact.

I get that perfectly and you are right, the only problem for me is that some information I posted shouldn’t be public. I don’t think its a problem but just to be safe I wanted to protect