How do I add Calculated Field for Average Count Per Day Per Month (Trends)?
How do I add Calculated Field for Average Count Per Day Per Month (Trends)
I have a card that I am currently using and I want to create a trend to tell the story of how we are doing with a particular metric at our site. The goal is display a trend line for average total number of alarms (in this case) that occur each day, per month. So, the chart below shows total alarms as a sum per month, but I need average alarms per day per month. Does that make sense? Our goal is to reduce the average daily total alarms occurrences over time.
Thanks,
John Whited
Answers
-
There are a couple of questions there that will change how things are calculated. You can do this with a beast mode something like:
AVG(COUNT(`AlertId`) FIXED (BY `AlertDay`))
This supposing that your dataset has individual entries per alert, but without knowing how your data is structured is a bit hard to provide more insights or suggestions.
0 -
Marcel,
I'd be happy to share the structure with you if you'd like.
I really appreciate your insight and help!
Thanks,
John
0 -
See snips here. The data structure is similar, but I don't have it the EventStampUTC broken out into individual columns, therefore I need to figure out how to use the Beastmode query / script to give me Average Per Day Per Month (or Per Week, or whatever).
0 -
Since what you have is a UTC timestamp, you'll need to apply your FIXED function on the date not the exact timestamp, you can do this by Simple wrapping the DATE function around it, like:
AVG(COUNT(`description`) FIXED (BY DATE(`EventStampUTC`)))
This assumes that all your entries will have a description field, if that might not be true then you'd need to swap this to something that is always filled out (reason why we first suggested and ID kind of column).
You will then drop this Beast Mode as the value to use in your graph, which should theoretically work. What this does is that it gives you the daily total, and that daily total is then averaged at any level above that.
0 -
Thanks so much Marcel!
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