Dividing two SUM equations does not yield expected result

I'm trying to create a column that divides by "On Hand Weight" by a "Daily Sales Average" to give an estimated amount of days of inventory available.
The "On Hand Weight" is a combination of weight at one facility + the weight at the farm level (decided by a variable entry). This is my current attempt though it seems to be multiplying the variable amount in "Farm Weight" to create a much larger sum than should be.
SUM(On Hand Weight
)+Farm Weight
/ SUM(Daily Sales Average
)
Best Answer
-
Sorry, I may have misunderstood the request at first. I think this might work? It sums the on hand weight, and adds the farm weight variable once to that sum. It seemed to work in some mock data I threw together, but let me know if I got it wrong again :)
(SUM(
On Hand Weight
)+min(Farm Weight
)) / SUM(Daily Sales Average
)0
Answers
-
Maybe try wrapping farm weight into the first sum:
SUM(On Hand Weight+Farm Weight) / SUM(Daily Sales Average)
0 -
I've tried that. The "Farm Weight" is one single amount assigned through a variable controller where as the "On Hand Weight" is a sum of multiple rows. I believe when I wrap it this way it tries to assign portions of the "Farm Weight" to each row of "On Hand Weight" which results in a number in the millions when it should actually be something in the 10s of thousands.
I may need to do a further sum/grouping in the ETL instead of trying to accomplish this sum in the analyzer.
0 -
@Sean_Tully It's definitely something to do with the Variable
Farm Weight
. Nothing I do recognizes it as a single amount that i'm adding to a "sum". It just keeps trying to create more instances of the variable against the rows of the "On Hand Weight".0 -
can you provide a small sample of the data please?
0 -
Sorry, I may have misunderstood the request at first. I think this might work? It sums the on hand weight, and adds the farm weight variable once to that sum. It seemed to work in some mock data I threw together, but let me know if I got it wrong again :)
(SUM(
On Hand Weight
)+min(Farm Weight
)) / SUM(Daily Sales Average
)0 -
@Sean_Tully That did it. Thank You
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 305 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 107 SQL DataFlows
- 648 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 774 Beast Mode
- 75 App Studio
- 43 Variables
- 733 Automate
- 186 Apps
- 471 APIs & Domo Developer
- 62 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 403 Distribute
- 117 Domo Everywhere
- 277 Scheduled Reports
- 9 Software Integrations
- 137 Manage
- 134 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive