User16764241763
Databricks Employee
Databricks Employee

Hello @Sudeshna Bhakat​ 

Thank you for posting on Databricks Community Forum

Could you please use Dashboard filters

https://docs.databricks.com/sql/user/queries/query-filters.html

Query

SELECT l_linenumber AS linenumber, COUNT(*) AS cnt FROM lineitem WHERE l_linenumber = {{var}}

GROUP BY l_linenumber

Query editor looks like below

image 

When you add this query to the dashboard, the var looks like below

Dashboard

Dashboard 

Please let us know if this works for you.

I have filed a feature request internally to support this.