Arithmetic functions in custom metrics

When we are using arithmetic functions in custom metrics, Metabase is treating that column as text ignoring the data type of the used columns in the custom metric.

Because of the text data type, we are not able to plot those columns on graph on y axis.

It would be very helpful if anyone can help here. This issue we are facing while using Databricks as database. It is working fine for Snowflake