Home > OS >  Kusto query with filter depending on dashboard parameter
Kusto query with filter depending on dashboard parameter

Time:11-20

I want to be able to toggle a filter on my query via a parameter in dashboard. How can I turn the "where" operator off?

E.g. the parameter in the dashboard is "_toggle"

let _filter = dynamic(["A", "B"]);
Table
| where id in (_filter)  // execute this line only if _toggle == true
| project id

I already tried creating a second list containing all the ids and toggle between the small an the complete list via iff() but this is too resource intensive.

CodePudding user response:

you could try something like this:

let _filter = dynamic(["A", "B"]);
Table
| where _toggle == false or id in (_filter)
| project id
  • Related