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.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