Question

Change dimension label depending on join

  • 30 November 2022
  • 2 replies
  • 52 views

Userlevel 2

In explore this_view

join: created_by_user {

from :users

sql_on: ${this_view.created_by_id} = ${created_by_user.user_id} ;;

}

 

join: updated_by_user {

from :users

sql_on: ${this_view.updated_by_id} = ${updated_by_user.user_id} ;;

}

 

In view users

dimension: user_name {

label: “User Name”

}

 

How can I get labels “Created By User Name” and “Updated by User Name” - rather than “User Name” appearing twice?

 

Thanks


2 replies

Userlevel 6
Badge

you can either group fields in a created by/updated by grouping by using https://cloud.google.com/looker/docs/reference/param-explore-join-view-label or you could duplicate dimensions (labelling them for each created and updated) in the users view and exclude the irrelevant ones for the join using https://cloud.google.com/looker/docs/reference/param-explore-join-fields,

I dont think it’s possible to do dynamically using liquid.

Userlevel 2

Thanks. Was trying to avoid the view_label route, as single field values that don’t really require their own section in the explore. Will have to duplicate the dimension, as you say.

Reply