Hello Everyone,
I am using toggle widget in my dashboard. This is selected with a field from dataset (not custom widget). I would like to show my KPIs like H-M-L. This will allow users to select specific KPI and filter the table for deep dive analysis.
I just noticed, when there is no record, this toggle shows "No Available Option" warning message always. I want to keep the title always as H-M-L. I tried to use customize display and format, however it is not working when there is no data.
How can I set a default value always in this case?
Here is the example for KPI you can see in my attached screenshot. First KPI has message because there is no option. Second KPI looks good.
Thx
Yeah that's the classic toggle, one way around it: keep the static toggle but handle the "nothing selected = show all" logic in your step's SAQL. Instead of a straight filter binding, wrap it in a condition, something like if the selection is empty, return all rows, otherwise filter by the selected value. That way the dashboard loads with everything visible and users just click one toggle to drill down.
The SAQL would look roughly like:
q = load "your_dataset";
q = filter q by ({{column(toggle_step.selection, ["H","M","L"]).isEmpty()}} || 'your_bucket_field' in {{column(toggle_step.selection, ["value"])}});
The isEmpty() check means no selection = no filter = all data shown. One click on H and it filters to just H, no need to deselect the others.