Beast Mode calculation when data is in rows and then how to chart
Hi All
I have a dataset (a sample is attached) where the 2 series I want to track are in the same column, identified by the Split Answer (i.e. male or female). I want to calculate the % split answer value by dividing the value by the sum of all values where the Split Detail is held constant (i.e. what is the % of female senior managers versus total senior managers (male+female)).
I have created the logic in Excel (refer to attached), so assume this means it can be written into a Beast Mode calculation. There are over 50k lines with this data presented in a dataset of 1.4m rows.
The next challenge is can the chart be created from this data set or does DOMO need to sculpt the data somewhere in the process to get the structure right for charting.
Thanks for any nudges to materials to read, or for any help with the logic.
Thanks
Ben
Best Answer
-
@BigWave Based on the data you provided, you should be able to use the beast modes below to without any additional manipulation:
% Female
sum(case when `Split answer` = 'Female' then `Value` else 0 end) / sum(`Value`)
% Male
sum(case when `Split answer` = 'Male' then `Value` else 0 end) / sum(`Value`)
If you just want the count of each answer, you can create 2 additional beast modes using just the numerators of the examples above.
1
Answers
-
@BigWave Based on the data you provided, you should be able to use the beast modes below to without any additional manipulation:
% Female
sum(case when `Split answer` = 'Female' then `Value` else 0 end) / sum(`Value`)
% Male
sum(case when `Split answer` = 'Male' then `Value` else 0 end) / sum(`Value`)
If you just want the count of each answer, you can create 2 additional beast modes using just the numerators of the examples above.
1 -
Thanks @MichelleH - how do I chart these two created series as lines with the y-axis being 0%-100%? I can see the chart 100% Stacked Bar that does it for bar chart but I can't find the 100% line bar?
0 -
Hi
I want to add another variable to the above equation but can't get it to work. In my Excel days I would use an IF statement. Here is my equation:
when 'primary class' = 'supermarkets and gocery stores' THEN sum(case when `Split answer` = 'Female' then `Value` else 0 end) / sum(`Value`)
Thanks
Ben
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive