Change Query by free typing in dashboard

Hi all,

I want to change query by typing in dashboard level.

 

Like There's some filter window in dashboard.

And let's assume LookML is written like this (Of course it doesn't actually work. It's just example to help you understand.)

derived_table : { SQL : SELECT * FROM Table Where { %parameter_which_get_values_on_dashboard} }

 

So, If I type(not a choose) like ' ID = 3 AND Brand = 'Looker' Like this in dashboard filter, SQL will work 'SELECT * FROM Table Where ID=3 AND Brand= 'Looker'

 

I checked that the value can be changed through the parameter. However, from what I tested, it only show specific value which already declared by 'allowed_value' . I'd like to put the value freely as above, not this declared value.

 

Is it possible to do that?

Thanks 🙂

Solved Solved
0 6 1,609
1 ACCEPTED SOLUTION

Hi @ulyssisss - It is possible to have a parameter that takes typed in values instead of values from database or allow list but it will not take spaces within the text ( like you are asking ->"  ID = 3 AND Brand = 'Looker'  "). And, for it to work, we need to define a parameter as below and then define the derived table.

parameter: test_param {type=string}

And then define the derived table with sql like .... FROM Table Where ID={% parameter test_param%}

Hope this helps

~Ashish

 

View solution in original post

6 REPLIES 6
Top Labels in this Space
Top Solution Authors