Fixed variables (like a parameter) in LookML

Let's say that I have several measures in metric units, and I want to recreate the units for imperial units. If I have {distance_meter_sum} as 1 meter, then {distance_feet_sum} would be calculated as {distance_meter_sum}*3.28084. Let's say I want to do this for several measures that require conversion, so instead of typing 3.28084 every time, is there a way I could set a parameter or a fixed variable to 3.2804? Then I would make {distance_feet_sum} = {distance_meter_sum}*{parameter_meter_to_feet} rather than having to look up / memorize the conversion factor every time.

I get that I can do this as its own measure, but I feel like that's super inefficient to make a column for each conversion for every data point, and I would rather just have a single value to point to.

Is this possible? 

Solved Solved
0 2 385
1 ACCEPTED SOLUTION

Hi,

In manifest.lkml you can add constant values, as shown:

 

constant: meter_to_feet{
  value: "3.28084"
}

 

 

View solution in original post

2 REPLIES 2

Hi,

In manifest.lkml you can add constant values, as shown:

 

constant: meter_to_feet{
  value: "3.28084"
}

 

 

Thank you. I looked up manifest.lkml in Google and found this article: https://cloud.google.com/looker/docs/reference/param-project-manifest

Top Labels in this Space
Top Solution Authors