Dynamic data comparison
Hi,
I want to perform QTD, YTD without using Domo inbuilt features dynamically.
Like, I will have a dropdown for Year using dropdown chart using the Year column from dataset.
And variable selector for QTD, YTD. User may select any of the variable selector and any one year from the dropdown.
Example:
Variable Selector : QTD || Year: 2024.
Now, I want to have two beast mode calculations.
- For Current selected year QTD (for the current quarter)
- QTD for the selected year - 1.
Also, if the user selects no year from the dropdown, the default QTD (as soon as he clicks on it) should show the data for 2024 (current year).
Appreciate your inputs! Thanks in advance. :)
Best Answer
-
@LearningNinja Why do you want to avoid using the built-in date-range/grain filters provided by Domo?
Based on your question here, I would suggest that you take the following approach.
- Set your default card display date range to current year in Analyzer (this will make the card default to show the current year as you requested above).
2. Set up a beast mode that will classify records as being either in a "Complete Month" or a "Current/Future Month"
CASE WHEN DATE(date_column) <= DATE(LAST_DAY(DATE_SUB(CURRENT_DATE(),INTERVAL 1 MONTH))) then 'Previous Completed Months' else 'Current/Future Months' END
3. Use the page filter options for dates. For example, if you wanted to show the current quarter for completed months, you would select the following. You can see that this excludes June data since June is north completed.
This will let your users select any date range that they want, while excluding rows from incomplete months.
Regarding doing period-over-period comparisons. I would recommend reviewing this excellent video made by @MarkSnodgrass, he lays out a very flexible way to set this up.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1
Answers
-
@LearningNinja Why do you want to avoid using the built-in date-range/grain filters provided by Domo?
Based on your question here, I would suggest that you take the following approach.
- Set your default card display date range to current year in Analyzer (this will make the card default to show the current year as you requested above).
2. Set up a beast mode that will classify records as being either in a "Complete Month" or a "Current/Future Month"
CASE WHEN DATE(date_column) <= DATE(LAST_DAY(DATE_SUB(CURRENT_DATE(),INTERVAL 1 MONTH))) then 'Previous Completed Months' else 'Current/Future Months' END
3. Use the page filter options for dates. For example, if you wanted to show the current quarter for completed months, you would select the following. You can see that this excludes June data since June is north completed.
This will let your users select any date range that they want, while excluding rows from incomplete months.
Regarding doing period-over-period comparisons. I would recommend reviewing this excellent video made by @MarkSnodgrass, he lays out a very flexible way to set this up.
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**1
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive