Beast mode percentage of
I am trying to calculate the percentage of the total for each media. I will be using this on a table (media as dimention, spend as metrics). Here is my formula:
SUM(CASE WHEN `media` = 'Radio' THEN `spend`
WHEN `media` = 'A' THEN `spend`
WHEN `media` = 'B' THEN `spend`
WHEN `media` = 'C' THEN `spend`
END)
/
SUM(`spend`)
However, it seems the second does not SUM all spend. So, it gives 100% on each media.
How do I get them?
Please advice.
Comments
-
You could use a 100% stacked bar chart to show the percentages.
Actually, I’m pretty sure most bar graphs give a data label setting to show percent of total.
You could also use beast modes to display the information in a table horizontally. But you would need a separate bastmode for each metric.
Radio
SUM(CASE WHEN `media` = 'Radio' THEN `spend`
ELSE 0
END)
/
SUM(`spend`)A
SUM(CASE
WHEN `media` = 'A' THEN `spend`
ELSE 0
END)
/
SUM(`spend`)And so on...
you our would have to make sure that `media` was not a field on your table though
0 -
Hi Superman,
As you mentioned, each calculation and formula works. But. I want to show % on a table, not a chart, and 'media' dimension would be on the table.
Do you know how to get these in one place?
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
- 627 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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