You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a workbook with a global parameter for holding selections made from an initial query table. I then want to use that selection to filter results in a later query.
I also want to default to showing all data when no selection has been made, and only filter when the multi-value parameter is populated.
I've set set the initial query to export it's selection parameters as follows:
I see results when I have made a selection, but I can't figure out how to create value KQL when the parameter has no selections, and is a null.
For example:
| where AppService has_any ({AppServices})
is rendered as | where AppService has_any ()
and similarly something like this to try and work around the null doesn't parse either: | extend myFilter = iff({AppServices:label} = '<unset>','',{AppServices})
because it's rendered as | extend myFilter = iff('<unset>' = '<unset>','',)
Basically, I need a value other than :label that won't be nulll when the parameter is unset. Are there any tips for doing this? I can't see anything in the docs that helps me and I can't figure out how to create KQL that will be valid when the the parameter is null.
The text was updated successfully, but these errors were encountered:
for some examples here, the normal case is to do something like this:
let selection = dynamic([{Selection}]);
SomeQuery
| where array_length(selection) == 0 // handles no selection being treated as all
or "*" in (selection) // handles special case of all=* handled as all
or SomeField in (selection) // handles specific selected value matches
converting the selected value into a database array will work with no value there, it ends up being resolved as dynamic([]) which is a valid empty array.
if you're using ADX or Logs, you can do this directly , because they support let. If you're using ARG, where let isn't supported, you'd unfortunately have to possibly do that dynamic([{Selection}] multiple times inside the query text instead.
I have a workbook with a global parameter for holding selections made from an initial query table. I then want to use that selection to filter results in a later query.
I also want to default to showing all data when no selection has been made, and only filter when the multi-value parameter is populated.
I've set set the initial query to export it's selection parameters as follows:
I see results when I have made a selection, but I can't figure out how to create value KQL when the parameter has no selections, and is a null.
For example:
| where AppService has_any ({AppServices})
is rendered as
| where AppService has_any ()
and similarly something like this to try and work around the null doesn't parse either:
| extend myFilter = iff({AppServices:label} = '<unset>','',{AppServices})
because it's rendered as
| extend myFilter = iff('<unset>' = '<unset>','',)
Basically, I need a value other than
:label
that won't be nulll when the parameter is unset. Are there any tips for doing this? I can't see anything in the docs that helps me and I can't figure out how to create KQL that will be valid when the the parameter is null.The text was updated successfully, but these errors were encountered: