cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
Oftentimes we want our end users to select a filter in order to use a dashboard. One of the ways we can do this is by building it into then chart SQL, as shown below:
select
  case
    when '[source_test|default]' = 'default'
      then 'Please select a filter value'
    else '[source_test]'
  end as source
  , case
    when '[source_test|default]' = 'default'
      then null
    else count(*)
  end as number_of_users
from
  users
where
  [source=source_test]
group by
  1
This approach leverages direct replacement filters and the default pipe notation to control the behavior of the query when no filter value is selected. With the [source_test|default] notation, we inject the value to the right of the | if no filter value is selected. Therefore, when no filter is selected, we get 'default'='default', a true statement. Otherwise we go into our else clause. Note that similar logic can be implemented in the where clause of a query as well.
 
If no filter value is selected, we will see a result like this:
If we do select a filter value, then we will see results:
Other ways you can encourage end-users to perform a certain action are:
  • Creating number overlays with instructions on how to interact with the dashboard
  • If the description is too large for a number overlay, consider creating an Image with the text you want to show and displaying that on the top of your dashboard
  • Other ideas? Comment below!
Version history
Last update:
‎02-15-2024 02:17 PM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: