Filter Suggest Dimension from Liquid Parameter

Hi All,

I am creating a dynamic comparison tool which allows users to select a granularity to compare a selection to a total population. As an example, my hierarchy looks like this:

Business Unit

Category

Group

The users can select which level to focus on (e.g. Group) and what to compare it to (e.g. Category). This functionality appears to be working, however, the suggest_dimension is not passing through from the filter. Apologies if this is unclear, I can add further details as needed. My LookML is shown below. Is there a way to have the field selected in “selected_field” populate the suggestions for the comparison field? This was looking when I had the comparison hard coded to filter at the Group level, but now that it is dynamic it does not seem to be working.

 filter: comparison {
      suggest_dimension: selected_field
      type: string
      suggestable: yes
      full_suggestions: yes
      bypass_suggest_restrictions: yes
    }

    dimension: selected_field {
      label_from_parameter: field_select
      type:  string
      sql:  CASE  WHEN {% parameter field_select %} = 'Group' THEN ${group}
                  WHEN {% parameter field_select %} = 'Category' THEN ${category}
                 ELSE ''
            END
      ;;
    }

    parameter: field_select {
      type:  string
      allowed_value: {
        value: "Group"}
      allowed_value: {
        value: "Category"
      }
    }

    dimension: group {
      type: string
      sql: CASE
        WHEN {% condition comparison %} ${selected_field} {% endcondition %} THEN ${selected_field}
        ELSE 'Others'
      END;;
    }

5 Likes

I’m facing a similar problem, it would be good to be able to dynamically set the suggest_dimension dynamically based on a parameter value.

1 Like

Facing the same problem. I suppose this isn’t possible yet?

Anyone from Google maybe? I believe this is impacting many different use cases.