Change dimension label depending on join

  • 30 November 2022
  • 2 replies

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?



This topic has been closed for comments

2 replies

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.

Userlevel 7

you can either group fields in a created by/updated by grouping by using 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,

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