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.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 637 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 762 Beast Mode
- 65 App Studio
- 42 Variables
- 704 Automate
- 182 Apps
- 458 APIs & Domo Developer
- 53 Workflows
- 11 DomoAI
- 39 Predict
- 16 Jupyter Workspaces
- 23 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 133 Manage
- 130 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive