How to create a funnel chart visualization in Looker?

How to use a dimension from another view in Looker?

  • January 25, 2018

We can use a substitution operator ($) to reference dimensions and measures from other views in LookML.

Consider the following code where we have two views, example_A and example_B. 

############################################

View: example_A { 

sql_table_name: xyz ;;

dimension: field_A {
type: number
sql: ${TABLE}.id ;;
}

############################################

View: example_B {

 sql_table_name: abc ;;

dimension: field_B {
type: number
sql: ${TABLE}.id ;;
}

dimension: field_from_example_A {
type: number
sql: ${example_A.field_A} ;;

}

############################################

 

As you can see, the view example_B has a field called field_from_example_A, which is referencing field_A from example_A by using the substitution operator ($) as ${example_A.field_A}

Please note: Both the views should be joined in a common Explore to reference fields from each other.


Up Next:

Read How to allow dimension/measure tooltip in Looker to show the description to user when pointing over name of the object in a Look (table)?  

More Resources We Think You Might Like

How to create a funnel chart visualization in Looker?

How to add custom visualization in Looker using...

In Looker, there are two ways to add custom visualizations using Javascript: Adding a custom visu...

  • Looker FAQs
  • January 15, 2018
How to create a funnel chart visualization in Looker?

How to comment on an entire block of code in th...

In Looker, one can follow the below instructions to comment a block of code in LookML editor:  Se...

  • January 22, 2018
How to create a funnel chart visualization in Looker?

How to create a rolling average with table calc...

Let’s understand this in two parts. Part 1: What is a Moving Average?  If we want to calcul...

  • Looker FAQs
  • January 21, 2018