Plot of rolling calculation
I'm fresh into Domo and but have reached my limit with a rather interesting request.
I have created a card that ranks the top 60 performing days out of the previous 120 days.
However, it only does this for the current day. In the attached graph the number I'm interested in is the 388. That's "Today's number"
For any day I would like to take the minimum of the top 60 days (out of previous 120) and then plot that value over time.
So for a given date Domo would calculate the top 60 best performing days out of the previous 120. Then take the _minimum_ best forming day (ie the lowest value in the top 60) and the score of that day that would become the score for the original day of the calculation.
Any hints?
In a related question - I think if I can see the code for the the current chart that will be a big step towards creating the code that I want. (Ie I sometimes work better in code than GUI) Is there any way to see the code that was generated for a card? Then I can use that as a starting point.
Thanks in advance!
Best Answer
-
I do not believe that this can be accomplished via the calculated fields, or beast modes.
If I'm understanding the request, you want to get a rank of the top 60 days of sales performance (out of the last 120 days) for each day, and then return the value of the 60th best day out of those 120.
As your post showed, that means that for today's date you would want to see the value $388. Does the date of that value matter to you as well?
You are essentially wanting to track how the average sales performance is trending. You are calculating the median instead of the mean. For example, if a store had 60 great sales days and 60 horrible sales days, then then "rank 60" value would look really good even though overall sales could be down.
I might suggest calculating a rolling "120 day avg" sales number.
Either way, you will need to make these calculations from inside a dataflow and not via a beast mode.
Are you more comfortable with the drag and drop ETL, or the mySQL data flows?
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman1
Answers
-
I do not believe that this can be accomplished via the calculated fields, or beast modes.
If I'm understanding the request, you want to get a rank of the top 60 days of sales performance (out of the last 120 days) for each day, and then return the value of the 60th best day out of those 120.
As your post showed, that means that for today's date you would want to see the value $388. Does the date of that value matter to you as well?
You are essentially wanting to track how the average sales performance is trending. You are calculating the median instead of the mean. For example, if a store had 60 great sales days and 60 horrible sales days, then then "rank 60" value would look really good even though overall sales could be down.
I might suggest calculating a rolling "120 day avg" sales number.
Either way, you will need to make these calculations from inside a dataflow and not via a beast mode.
Are you more comfortable with the drag and drop ETL, or the mySQL data flows?
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman1 -
Thanks for that response!
I think you have a pretty good understanding of what I need. No the date of the lowest performance doesn't matter.
Unfortunately I'm mainly interested in simply making sure that minimum stays above a certain threshold. The average of the top group is not relevant.
I will start to poke around in the dataflow model and go from there.
Much appreciated!
0
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
- 710 Beast Mode
- 50 App Studio
- 39 Variables
- 668 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 45 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 116 Manage
- 113 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