Dynamic aggregation based on user selected date grain
I have a dataset that appends daily to build out a historical view. I want to be able to always show the latest record per date grain based upon the user selected date range and grain.
For example, if a user selected YTD by month, then I would want to show the following values from the last day of each month
SUM(values) from Jan 31st snapshot (ignore all other snapshots in Jan).
SUM(values) from Feb 28th snapshot (ignore all other snapshots in Feb).
SUM(values) from March 31st snapshot (ignore all other snapshots - in Mar), etc.
If a user selected current YTD by Week, I would want to show the following values from the last available snapshot of each week.
SUM(values) from the last day of week 1 (ignore all other snapshots in week1)
SUM(values) from the last day of week 2 (ignore all other snapshots in week2, etc.
I want to avoid doing this in ETL if possible, because I want it to be as responsive as possible and work across a variety of user selected date ranges/grains.
I've been playing around with window/fixed functions, but can't seem to get them to work. Details below
David Cunningham
** Was this post helpful? Click Agree 😀, Like 👍️, or Awesome ❤️ below **
** Did this solve your problem? Accept it as a solution! ✔️**
Best Answer
-
Beastmodes don't have access to the selected date grain on the date selector so you won't be able to do it that way. You could utilize a variable to select the date grain which you would have access to.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
Beastmodes don't have access to the selected date grain on the date selector so you won't be able to do it that way. You could utilize a variable to select the date grain which you would have access to.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Having the date selector values available as system variables is exactly the kind of thing I was hoping for when I made this enhancement request, please vote for it if you're interested in seeing this functionality available.
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
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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