Cannot use filter for Native Query

Hi Insights Team,

I need to use native query to write complex sql and join some related tables. The native query run well but when adding to dashboard I cannot use filter. The filter cannot find column name of the query.
Please help me on this issue.

Thanks
Dharma Han Nguye

Hi, @hanntd
The dashboard filters aren’t supported with native queries yet. It is planned to be supported though.

Thanks @nextchamp.saqib

Any timelines on when this will be available?

No specific timeline has been established yet. However, I can assist you in creating a specification that you can use to implement the feature on your own.

Hi @nextchamp.saqib , Can you please give some idea how can an individual do so?

Hi Insights Team,
Not sure that is it similar / different but I need to use script query to fetch data from api. The script query run well but when adding to dashboard I cannot use filter. The filter cannot find column name of the query.
Please help me on this issue.

Filters can be applied for Native Queries using this method:

  1. Enable Query Reusability in Insights settings
  2. Create a native query
  3. Create a visualised query with table as the native query
  4. Add this visual query to dashboard
  5. We can add filters to this visual query that inherits native query

Reference: https://x.com/FrappeInsights/status/1780543019206250977