# Filter Suggest Dimension from Liquid Parameter

**URL:** <https://discuss.google.dev/t/filter-suggest-dimension-from-liquid-parameter/112985>\
**Category:** Looker\
**Tags:** lookml, filter\
**Created:** [October 30, 2020, 9:09pm UTC](https://discuss.google.dev/t/filter-suggest-dimension-from-liquid-parameter/112985 "2020-10-30T21:09:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [October 30, 2020, 9:09pm UTC](https://discuss.google.dev/t/filter-suggest-dimension-from-liquid-parameter/112985/1 "2020-10-30T21:09:51Z")

</div>

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.

```auto
 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;;
    }

```

---

<div class="post-metadata">

**Author:** ![anonymous8](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@anonymous8](https://discuss.google.dev/u/anonymous8)\
**Post date:** [April 13, 2021, 11:04am UTC](https://discuss.google.dev/t/filter-suggest-dimension-from-liquid-parameter/112985/2 "2021-04-13T11:04:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pitaroFGH](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/pitarofgh/32/1108_2.png) [@pitaroFGH](https://discuss.google.dev/u/pitaroFGH)\
**Post date:** [November 17, 2023, 12:39pm UTC](https://discuss.google.dev/t/filter-suggest-dimension-from-liquid-parameter/112985/3 "2023-11-17T12:39:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ftufekci](https://d3byx8b92xw3lq.cloudfront.net/user_avatar/discuss.google.dev/ftufekci/32/102815_2.png) [@ftufekci](https://discuss.google.dev/u/ftufekci)\
**Post date:** [May 20, 2024, 11:00am UTC](https://discuss.google.dev/t/filter-suggest-dimension-from-liquid-parameter/112985/4 "2024-05-20T11:00:16Z")

</div>

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