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.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