How to create a beast mode calculation that can do a count and then sum
I’m currently working on an issue dealing with conducting a filter than an aggregate in beast mode. (I will say at this point that I have a feeling that this may not be done in Beast Mode.)
I have my data that looks something like this:
Col A Col B Col C (What I need to create)
B 2 0.2
G 4 0.4
H 4 0.4
The total of Col B is 10 and this will be needed to calculate Col C. Also column B is the count of column A-meaning how many times the letter B or letter G appears.
Currently, I have no way to get the running total of col B which I need to calculate the percentage from Col A like the following: 2 B’s and that divided by the total, 10, will give me 0.2.
I’ve been trying to write a Beast mode calculation on this and have something similar to this:
(CASE
WHEN `Col A` = 'B' THEN COUNT(`B`) / SUM(COUNT(`B`))
WHEN `Col A` = 'G' THEN COUNT(`B`) / SUM(COUNT(`B`))
WHEN `Col A` = 'H' THEN COUNT(`B`) / SUM(COUNT(`B`))
END)
I know that the SUM on a COUNT gives me the error message and will not validate.
However, as I know from looking at the first below link, I cannot do a filter than an aggregate in Beast Mode. However, the reply came in over two years ago and hoping that there’s been a solution since then. Does anyone have any idea how to modify my code so that I can do this in beast mode? Or does the data have to be modified elsewhere? (Such as in SQL?) Thank you for any help that may be provided.
Other Links that I’ve looked at for a solution:
Best Answer
-
Hey user09207,
In this circumstance, I would personally use a dataflow to manipulate these values. However, you may want to reach out to your Domo account team if you wanted to confirm what can be accomplished via beast mode here.
Thanks!
0
Answers
-
Hey user09207,
In this circumstance, I would personally use a dataflow to manipulate these values. However, you may want to reach out to your Domo account team if you wanted to confirm what can be accomplished via beast mode here.
Thanks!
0 -
Good day Jarvis,
Thank you for your response! At my office we discussed doing exactly that. We also found that the values that we were trying to get could be gotten by using a graph but not the table object. I originally had all the data in the DOMO table chart type and that was not working for me. However, when I moved to a bar graph I could get a percentage of the whole. Without a doubt, in the future, I believe using a dataflow to manipulate the values would be the best course. I just wish DOMO's beast mode would allow you to do this! Thank you again for your response!
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