Knowledge Drop

How do I turn a dimension of type string into a measure?

  • 15 June 2021
  • 0 replies
  • 247 views

Userlevel 1

Last tested: Apr 6, 2020
 

In some cases, users want to turn their dimension of type string into a measure (to put into a pivot, for example).

To turn a dimension of type string into a measure, we can create a measure of type string and put an aggregation into the sql parameter so that it doesn't throw the GROUP BY/ AGGREGATION error, like so:

measure: gender {

type: string

sql: max(${table}.gender);;

}


 

 

This content is subject to limited support.                

 

 

 


0 replies

Be the first to reply!

Reply