How do I force a Filter to have a value?
I have a dataset that looks something like this:
I want to build a card that shows the Q over Q difference and allow the user to filter by Region. But I also need to either have the filter always have a value, i.e., not allow the user to unselect all values, or show the difference between the 'Global' values when none of the region values are selected.
For example. If I filter on 'AMER' I should see and the card I built does show this:
This is just Q2 - Q1 or 80.4 - 78.2 This works fine. And if I select 'Global' in my filter I see this:
...again this works fine and is what it should be, 79.2 - 79.8
HOWEVER, if the user clicks on 'Global' once again and therefore unselects all values on the filter the results go to this:
...which is the sum of all Q2 values minus the sum of all Q1 values. The user may think by unselecting all filtered Region values they will see the 'Global' value. However, they see the sum of all of the values which is incorrect and these scores are not additive.
So, is there a way to force the filter to have a value?
Or is there another way of going about this?
Thank you.
Answers
-
There isn't a way to force a filter to have a value currently. Typically in this case I'll have a text box on the page with a beast mode that checks to see if the distinct count of records (in your case Region) is more than 1 I'll return a string stating to select only one value as a warning.
CASE WHEN COUNT(DISTINCT `Region`) > 1 THEN 'Please select only one region' ELSE '' END)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive