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.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
- 737 Beast Mode
- 55 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 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
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive