Can we apply pivot over dimension?

  • 26 May 2021
  • 1 reply
  • 310 views

Userlevel 3

Yes, we can by using type: list in Measure field.

 

measure: list { type: list list_field: first_name }

dimension: first_name { type: string sql: ${TABLE}.first_name ;; }

 

*NOTE type: list creates a list of the distinct values in a given field. If two or more string value are included in the calculation, the data are separated by a comma as shown in the example below:

 


1 reply

I use this for a list of hyperlinks. However, when pivoted the links are not working anymore. Can you help with this?

 

 

  dimension: image_link {
type: string
sql: ${TABLE}.image_link ;;
link: {
label: "Image in Platform"
url: "@{link_image_platform}"
icon_url: "@{link_favicon}"
}

measure: image_link_list {
type: list
list_field: image_link
}

 

Reply