Reuse reference tables in lookml

Just getting started with looker and building our first model. We have reference/dimension tables in our database that we need to join multiple times to the fact tables in lookml. We’re in healthcare, so one example is for physician details, where a hospital visit has several physicians - primary care, admitting, attending, consulting, surgeon, etc. We want the physician details to be grouped in the field picker depending on what the physician role was, but it seems we’re only able to give one group_label to the dimension fields in the looker view.

Is there a way to override the group_label based on the join? Do we need to create copies of the reference table view for each time it will be joined in the model?

Solved Solved
0 2 230
1 ACCEPTED SOLUTION

We were able to do what we wanted using a Liquid variable in the group_label field. We have a base view defined for our physician master, then a second view that extends the base view. In the extended view, we list each dimension again, but only specify a group_label parameter, which gets its value from the _view._name Liquid variable. The view name value comes from the name given when joining the extended view in our model file. We’re able to join it multiple times and give each join a different name related to the join key.

View solution in original post

2 REPLIES 2

leobardor
Participant V

Hi Yale.

You may want to add dynamic filters on your dashboard depending of the role matched on the table.

To achieve this, you can use templated filters.

Looker - Templated filters

You can add a filter and a parameter group based on a list. I think “roles” table should be included in the filter.

Hope this help

Regards

Leo

We were able to do what we wanted using a Liquid variable in the group_label field. We have a base view defined for our physician master, then a second view that extends the base view. In the extended view, we list each dimension again, but only specify a group_label parameter, which gets its value from the _view._name Liquid variable. The view name value comes from the name given when joining the extended view in our model file. We’re able to join it multiple times and give each join a different name related to the join key.

Top Labels in this Space
Top Solution Authors