How to I bring the % of total or Contribution from a grand total to a new column in Table chart?
Hi,
I am trying to use normal Table card and Sumo card where I have categories in Column A, and count of categories in coumn 2. I would like to bring the Contribution or % of total of each categories listed in Column A. There is an option % of total in properties but it comes under row which is not required. So please help me how we can bring the % of total in a new column.
Please help us whether we can use ETl or beast mode calculaution to work on it.
Best Answer
-
It's displaying blanks because you likely have nulls in your field you're calculating. You can fix that issue by utilizing IFNULL in your BeastMode
`To Skill` / SUM(IFNULL(`To Skill`, 0))
With that being said this still won't answer your initial request. This is because the assumption was that the totals were calculated prior to being pulled into the card rather than depending on the card to summarize the counts. Domo can't handle a grouping within a grouping. To get around the issue you'd need to create a new dataflow to do your grouping and count first and then using that dataflow as your input for the card. Then the code above should work correctly for you to get a percentage of the totals.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Answers
-
You should be able to do a Beast Mode calculation:
`Column 2` / SUM(`Column 2`)
This will get you the percentage breakdown across the entire dataset. (Make sure it's formatted as a % in your card)
Assuming this is your data:
| Column A | Column 2 | Percentage |
| ------------- | ------------- | ---------------- |
| Cat 1 | 10 | 40% |
| Cat 2 | 8 | 32% |
| Cat 3. | 1 | 4% |
| Cat 4. | 6 | 24% |
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Hi
I got your reply and Thank you so much for a quick reply.
However based on your request, I tried using the calculation in beast mode but unlucky, i didnt get the outout. I am not sure whether I adid it correctly.
Please look at the snap shot in the atatched file. Please correct me if I did it incorrectly.
Waiting for your reply Team.
0 -
It's displaying blanks because you likely have nulls in your field you're calculating. You can fix that issue by utilizing IFNULL in your BeastMode
`To Skill` / SUM(IFNULL(`To Skill`, 0))
With that being said this still won't answer your initial request. This is because the assumption was that the totals were calculated prior to being pulled into the card rather than depending on the card to summarize the counts. Domo can't handle a grouping within a grouping. To get around the issue you'd need to create a new dataflow to do your grouping and count first and then using that dataflow as your input for the card. Then the code above should work correctly for you to get a percentage of the totals.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Thanks for providing the solution but as you said using this in beastmode calculation it doesnt work, however as you said will try in ETL and let see if it works.
Thanks for taking time on this buddy.
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