Max Value per Month on a Weekly Feed Dataset
We have a dataset that pulls information from SQL that gets updated by the managers once a week for their current value (document review counts and percentage rates for activity per day per user, effecitve rates, price per doc for review). We are using this for our weekly reporting just fine, but, when we try to set up a card for monthly values, we cannot do that since we would be mutliple reporting numbers. How do we set up a beast mode that will take the values and apply the max rate for the month for each of the calculations noted?
Best Answer
-
So it looks like you want to first identify the latest date entry for each month and then show the metrics that were entered on that day.
In that case, I'm not sure if this is possible in beast mode. My approach would be to add a field `max_date_for_month` in either mySQL or ETL.
you could then filter with this beast mode:
case when `Date` = `max_date_for_month` then 'true' else 'false' end
Use that beast mode as a filter to only include the 'true' rows.
Let me know if you prefer etl or mysql and I can help you with the syntax to add the field
2
Answers
-
Hi @Tatyana_K,
Happy to help. Just to confirm, you would like each metric to display the max, or highest rate it was at during the month? In that case, when you use the metric field on a card you will want to set the aggregation to Max. Or, if using a beast mode you can use the Max() function. For example, Max(`review count`). This will give you the max rate for the month, if the card is filtered for one month/the current month. One other question, is there just one row of data for each metric each week?
Let me know if this is helpful, or if you have any other questions.
Best,
Domo Diesel
1 -
If I am understanding you, you have a table with different metrics for each manager. You want to know the max for each metric for each month by manager.
I think this would work for that:
MAX(`metric field`) OVER (PARTITION BY `Manager`,`Year`,`Month`)
That should give you the max value for each manager/year/month combination.
1 -
Hi Domo Diesel,
I would love if it was that simple to just use a MAX formula in beast mode. I think this might exceed that or it really is that easy! I'm attaching an example of our underlying data for one project to show how the numbers will increase and how each week has an entry but we only want to report on a monthly basis for the max value (or latest value for that month). Does this help clarify? A weekly chart is great, but monthly doubles up on the reporting metrics as you can see here.
Thanks,
Tatyana
0 -
So it looks like you want to first identify the latest date entry for each month and then show the metrics that were entered on that day.
In that case, I'm not sure if this is possible in beast mode. My approach would be to add a field `max_date_for_month` in either mySQL or ETL.
you could then filter with this beast mode:
case when `Date` = `max_date_for_month` then 'true' else 'false' end
Use that beast mode as a filter to only include the 'true' rows.
Let me know if you prefer etl or mysql and I can help you with the syntax to add the field
2 -
That sounds great! I will try that out. I think I can manage the beast mode after the ETL is set up but if I run into any hurdles, I'll come back to knock on your door @ST_-Superman-_ . Thank you and @Domo_Diesel for your quick assist here. - Tatyana
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