I would like a filter to only show options that will actually yield results, given the other filters set.
For example, I have a visual with user login history. There are a few filters on this such as date range of login, user team, user status etc. and a user name search.
When I set the date range to be the past day, just 10 users are displayed in the list. However, the user control shows all users in the dataset.
How can I make it show only those 10 users in the user name filter control?
Thanks for your reply - unfortunately I don’t think this will work in our case.
Some of the filters are hidden and don’t have controls.
I’ve also tried adding a calculated field but that gives an error when I use a parameter: Expression {{argumentName}} for function {{functionName}} has incorrect argument type {{incorrectArgumentType}}. Function syntax expects {{functionSignature}}.
Calculated field is simply: ifelse({Hierarchy ID} = ${teamParameter}, "Yes", "No")
For comparison, this (without the parameter) gives no error: ifelse({Hierarchy ID} = 5, "Yes", "No")
Thanks for your reply - you caught the issue regarding the calculated field, it’s multi-value. This is now kind of working, but I need to prevent “NULL” from showing in the select options. Note: this list is dynamic and I need “select all” to be enabled.
Is this possible? Or is there something else I should return from the calculated field?
How many options are available for users to choose? If it’s not a lot (easy to copy/paste or type a list) you could use “specific values” for your parameter instead of linking it to a field value. That way you can exclude NULL.
Thanks @duncan - that worked - I was expecting that custom filter list to remove the options.
I also had to set a default parameter in the analysis, so I could check “Select all”, then remove the default parameter and publish (the parameter is filled by our application when it’s embedded).
A bit of a hack but it works.
It would be good to see a select all option on the filter config always. We’ve also seen its not possible via the UI to configure a filter to select all when there are too many records to display, so we need to update via the API.