Remove numeric formatting from integer/decimal column

I’m new to Metabase, but I’ve looked in the documentation as can’t seem to find what I’m looking for.

I have a data view that returns Year (integer) and Period (integer), I would like these displayed in my SQL questions with no numeric formatting (I’m getting “2,018” instead of 2018). The data in these columns are also used for numeric comparisons, so I don’t want to convert these to strings in my view. Currently I have the field types of my Year, Period both set to “Category”, can I use any other field type that will remove the number format from the column, but still allow my users to filter on these columns using a list of values etc.?


You could use 2 columns - one with numeric, the other with text. Sort on the numeric value, display the text.

And in case you use SQL syntax and you want to compare years with each other you could use subselects to first select the relevant years and compare them. The overall select that you would use to show your data could convert them then to string.

Let me know if you need more info :slight_smile:

Hi Eva (and Andrew), thanks for the help. In the end I did a simple [cast(year as varchar2(4)) as Year] to fix the display. I just wondered if I was missing some column format option somewhere?
If not, not an issue.

Thanks again,
appreciated :slight_smile: