keep geetting: "columname" must appear in the GROUP BY clause or be used in an aggregate function

  • 15 October 2021
  • 0 replies

Hello !
I am trying to do a case when using two measures but I keep getting the same error and already tried everything said on the documentation.


Below is my code 

measure: first_task_date {
    label: "First task date"
    description: "Date of the first task made on this lead"
    sql: MIN(${task_ext.createddate_time}) ;;

✅ This measure on its own works
  measure: tasktype {
    type: string
    sql: ${task_ext.type} ;;

  🟠 I created this measure “calling” a dimension from another table because it was suggested in this article

However it’s still saying I have the same problem 


FYI this is what the info I really want looks like in my case when 👇🏼
  measure: first_call_date {
    label: "First Call Date"
    description: "First call on the lead"
    sql: CASE WHEN ${task_ext.type} = 'Call' then ${first_task_date} 
              ELSE null

Can someone help me please? :) 

This topic has been closed for comments