Using LookML CASE

Hi Team, 

I am referring to below link to achieve my requirement.

https://help.looker.com/hc/en-us/articles/360023657833

With above link i have achieved the DropDown based on different case condition but when i use the AND operator in the LookML Case statement it is not comparing the condition and result it to the “No Result”. Below is my code for your reference. Can i achieve it with LookMl Case Statement.


 

dimension: dimension_test {
    case: {
      when: { 

        sql:${TABLE}."JSON":"Field1"::string = 'value1' ;;
        label: "Label1"
      }      
      when: {
        sql:${TABLE}."JSON":"Field1"::string = 'value2' ;;
        label: "Label2"
      }
      when: {
        sql:${TABLE}."JSON":"Field1"::string = 'value13' ;;
        label: "Label1"
      }
      when: {
        sql:${TABLE}."JSON":"Field1"::string = 'value4' AND ${view_name.Field2}='xyz';;  // Here i used the AND operator and which results "No Results". All above code working fine.
        label: "Label4"
      }

      
      

      else: "NA"
    }
  }

Please help me how can i achieve it.

0 1 1,730
1 REPLY 1
Top Labels in this Space
Top Solution Authors