Knowledge Drop

How do I visualize a dimension as a measure?

  • 5 April 2021
  • 0 replies

Userlevel 5
  • Looker Staff
  • 172 replies

Last tested: March 2021


You may be wondering how to plot a dimension on the y-axis of a visualization.

Quick Solution

The quick way to do this is with a table calc involving an existing measure.
${dimension} + ( ${measure} * 0)

A similar approach can be taken with this table calc for a String dimension

More details on this method in the Help Center article here.


Proper Solution

The right way to do this is with an aggregate in LookML.

measure: sum_dimension {type: sumsql: ${dimension} ;;}

This content is subject to limited support.                

0 replies

Be the first to reply!