Parameter Filer
Hello everyone,
I wonder if someone has successfully figured out how to create a parameter filter in DOMO. I want to create a filter that allows dashboard readers to choose which two years they want to compare (e.g. 2021 vs. 2019 or 2022 vs. 2024). Thank you very much.
Best,
Anna
Best Answers
-
Yep, so basically you would join your data 1=1 so that it looks like this:
Then in your card you have your two values:
`data` and `comparison data`Users select a year and a comparison year and the data for each will be displayed. I would suggest setting default values for each, for example: 2022 vs 2023 and then from there allow users to change the dates.
If I solved your problem, please select "yes" above
1
Answers
-
Could you provide a bit more information? This is possible, and I have done this - but I want to better understand the type of content you have on your dashboard and how you plan to compare one year vs another visually.
The approach I took was to build a dataflow that had comparison data self-joined to the data and then had a filter to allow end users to select the 2 periods they want to compare. With a bit more information I'll know if this approach could work for you.If I solved your problem, please select "yes" above
0 -
@Anna_Yu This sounds like a good use case for Variables. I'd suggest creating two variables to select the years you want to compare. Here are some sample beast modes you could use with these variables:
Year 1 Total:
sum(case when YEAR(`Date`) = `Year 1` then `Amount` else 0 end)
Year 2 Total:
sum(case when YEAR(`Date`) = `Year 2` then `Amount` else 0 end)
Variance:
sum(case when YEAR(`Date`) = `Year 1` then `Amount` else 0 end) - sum(case when YEAR(`Date`) = `Year 2` then `Amount` else 0 end)
% Variance:
(sum(case when YEAR(`Date`) = `Year 1` then `Amount` else 0 end) - sum(case when YEAR(`Date`) = `Year 2` then `Amount` else 0 end)) / sum(case when YEAR(`Date`) = `Year 2` then `Amount` else 0 end)
1 -
Hello Colemen,
Thank you for taking my questions.
Here is my example. I have three columns in my dataset: number of sales, profits, and year. I created profits per item (profits/sales) in beast mode. I have used the "multi-value columns" card to show my readers the differences between the two years (e.g. profits per item 2023 vs. 2022). My challenge here is my readers want to choose the years by themselves (e.g. profits per item 2023 vs. 2021), so I think a parameter filter can solve this.
Hope I explained well. Thank you!
Best,
Anna
0 -
Yep, so basically you would join your data 1=1 so that it looks like this:
Then in your card you have your two values:
`data` and `comparison data`Users select a year and a comparison year and the data for each will be displayed. I would suggest setting default values for each, for example: 2022 vs 2023 and then from there allow users to change the dates.
If I solved your problem, please select "yes" above
1 -
Thank you, Michelle and Colemen. :)
I have created the 'parameter filter' with variables. Now, I am facing another issue: the colours. Is it possible to automate the colour rules? For example, when someone uses 2021 to compare with 2019, all the 2021 data are marked as red and 2019 as black, and when someone uses 2022 to compare with 2019, all 2022 data are marked as red instead, and 2019 remains black.
Thank you very much!
Best,
Anna
0 -
Hello Michelle, @MichelleH
My Year 1 and Year 2 are variables, so they can be any value, but yes, I want my Year 1 always be red and Year 2 always in black. I checked the colour rule settings but don't see my variables listed there. Thank you!
Best,
Anna
0 -
Hello Michelle, @MichelleH
The beast mode is shown as numeric, so in the colour settings, I have to put a number in the condition (as below). If I put a number in it, it won't be dynamic anymore. Please let me know if I understand you correctly. Thank you.
Best,
Anna
0 -
Hello Michelle, @MichelleH
I left the condition blank, but the colour does not appear on my chart. Thank you!
Best,
Anna
0 -
Hello Michelle, @MichelleH
It is not in my chart. My Y-Axis is category, X-Axis is sales, and SERIES is year. Thank you!
Best,
Anna
0 -
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive