How to use a parameter (costant) to multiply a column


i need apply to a column a costant via a parameter
For istance, i need to convert miles to km or viceversa.
Is there a way in metabase to do this via an external parameter (for istance an external widget) ?

Hi @aresb
Not entirely sure what you are asking for.
You would make a check of the variable, which then changes your SQL query to make the calculation.

select case when {{length}}='km' then <do some km calculation> else <do some miles calculation> end as "distance"