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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive