Parameter based dynamic fields & Custom parameter value
Hi Domo,
Is there any way to change field dynamically based upon parameter value?
For example: I want to build single Pie chart for different fields like Country, State, City & Region.
- How can i create parameter with just text values Country, State, City & Region.
and
- How can I change my fields in pie chart based on above parameter value.
If user selects Country from parameter then the chart should automatically show categorization based on country & vice-versa
Thanks in advance
Reference : https://www.edureka.co/community/42920/changing-filter-values-based-parameter-selection-tableau
Comments
-
The only way that I can think to accomplish this would be through some sneaky data engineering. You would need to be careful about how the dataset was going to be used because anyone not familiar with the structure would likely double or triple count you value.
That being said, what I think you want to do is to "stack" your data. You should be able to use something like this:
SELECT
'Country' as `Parameter`
,`Country` as `Parameter Value`
,`VALUE FIELD FOR PIE CHART`
FROM `your_table`
UNION
SELECT
'State' as `Parameter`
,`State` as `Parameter Value`
,`VALUE FIELD FOR PIE CHART`
FROM `your_table`
UNION
SELECT
'City' as `Parameter`
,`City` as `Parameter Value`
,`VALUE FIELD FOR PIE CHART`
FROM `your_table`
UNION
SELECT
'Region' as `Parameter`
,`Region` as `Parameter Value`
,`VALUE FIELD FOR PIE CHART`
FROM `your_table`This will essentially give you four copies of your data set all stacked on top of eachother. You would create a filter card with the `Parameter` field. Then your Pie chart would use `Parameter Value` for the Pie name and whatever your value field is for the pie value.
I would recommend adding a summary number like this to the pie chart so the user would know that they need to select a single parameter first
CASE
WHEN COUNT(DISTINCT `Parameter`) >1 then 'Please Select a Single Parameter from the Filters'
else concat(`Parameter`,' view')
END
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
@Gulam , check out this on Ideas/Exchange
Jacob Folsom
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 731 Beast Mode
- 55 App Studio
- 40 Variables
- 682 Automate
- 175 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 122 Manage
- 119 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 107 Community Announcements
- 4.8K Archive