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.6K Product Ideas
 1.6K Ideas Exchange
 1.5K Connect
 1.2K Connectors
 288 Workbench
 4 Cloud Amplifier
 7 Federated
 2.8K Transform
 94 SQL DataFlows
 593 Datasets
 2.1K Magic ETL
 3.6K Visualize
 2.4K Charting
 666 Beast Mode
 41 App Studio
 34 Variables
 644 Automate
 165 Apps
 434 APIs & Domo Developer
 42 Workflows
 3 DomoAI
 31 Predict
 12 Jupyter Workspaces
 19 R & Python Tiles
 378 Distribute
 107 Domo Everywhere
 266 Scheduled Reports
 5 Software Integrations
 109 Manage
 106 Governance & Security
 8 Domo University
 23 Product Releases
 Community Forums
 39 Getting Started
 29 Community Member Introductions
 95 Community Announcements
 4.8K Archive