List Measure - Can only have 1


(Elyse Weiss) #1

When using the list measure type, you can only use a single one in an Explore, otherwise you run into a SQL error because you cannot order by more than one thing in a single query. The order by isn’t actually necessary in the listagg function in Redshift, so this is unfortunate.

(lloyd tabb) #2

We’ll take a look at this. Thanks.

(lloyd tabb) #3

Wow, you are right. We’ll change the way we generate SQL for this.

(Elyse Weiss) #4

Thanks Lloyd! Appreciate it.

(Katie Reiter) #5

I’m running into the same limitation. What is the best workaround for this?

(peter.whitehead) #6

Hi @katie1

To better understand how you are running into this issue could you please send an email to With a few more details we can dive into the problem and trouble shoot more!


(lloyd tabb) #7

This has been fixed in recent releases.

This is a limitation of Redshift. You can manually code a list as a measure by:

measure: state_list {
  sql: LISTAGG(DISTINCT airports.state ,',')  ;;