Concatenete values

Hi,

I would like to know how can I create a new field which will concatenete x values (area code) into one string value.

Example:
 

6b7a59f2-3708-4c41-87f6-992594c42326.png


In example above, I would like to have a new field named “Parking Group” where we I can have a value named “Visitors” and which will include area code 750.009+750.016+750.015

Thanks for your help.

0 2 246
2 REPLIES 2

Hi,

There are different options, one of them is to create a parking_group dimension:

a0d29c55-7b04-42d6-ac63-ebc00c6daeb4.png

Hi @Faridininho

I'm not sure which database you used for the query. You can use GROUP_CONCAT if using MySQL or BigQuery, and STRING_AGG is applied to SQL Server, Azure SQL Database, and Azure Synapse Analytics.  Both concatenates the values of string expressions and places separator values between them

measure: parking_group {
    type: number
    sql: GROUP_CONCAT(${parking_area_code});;
  }
Top Labels in this Space