Table Margin Summary Column
Hello, I am relatively new to DOMO and was wondering if there
is any way to resolve the following issue. I have a simple table
chart with sales, cost, profit and margin displayed. I have enabled
a totals row at the bottom for sales, cost and profit using the
sum option. In the case of margin, I don't want to use the average
function for the margin column since that would not return a valid
value since all individual records above are weighted differently. I
tried adding an additional column to the right that uses a formula:
(SUM(`sales`) - SUM(`cost`) / SUM(`sales`)) * 100
and with this I can get a correct weighted average for margin
at the bottom of table but I don't really want to have to use
a duplicate column to the right of existing margin column,
especially since it appears I can't make the text color of the
values in this last column either white or transparent. If anyone
has any ideas on how to derive a margin based on the summary
of a few other existing summary columns I would really appreciate it.
Thanks.
Best Answer
-
can you share some sample data and an example of what you want calculated?
It sounds to me like the beast mode that you provided should work for the individual rows and the total row.
Basically, for a beastmode that is an aggregate function, the total row will apply the same aggregate function to all of the rows of data. so,
(SUM(`Sales`) - SUM(`Cost`)) / SUM(`Sales`)
should give you the % margin for each row and for the overall total.
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0
Answers
-
Why not remove the current Margin field and just use the beast mode?
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
I used the beast mode to calculate the margin on the first column
for the individual invoices looking for something to calculate
margin on the sum of all the invoices profit relative to sum of the
all the invoices sales. The average function for the tables margin
column would not return a correct result.
0 -
can you share some sample data and an example of what you want calculated?
It sounds to me like the beast mode that you provided should work for the individual rows and the total row.
Basically, for a beastmode that is an aggregate function, the total row will apply the same aggregate function to all of the rows of data. so,
(SUM(`Sales`) - SUM(`Cost`)) / SUM(`Sales`)
should give you the % margin for each row and for the overall total.
“There is a superhero in all of us, we just need the courage to put on the cape.” -Superman0 -
Thank you I think that may be the best solution.
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive