Variable group selections for ratio calculations
I have a need to display a ratio for two groups of names. First group is a single selection of one name and showing the calculated impact ratio (impacted divided by total). Second group is a multi-selection of other names and showing the calculated impact ratio (sum of impacted divided by sum of total).
I created two filter cards on the dashboard that only impact the bar chart but not each other. One to select the first group and another to select the second group.
First Group Ratio: sum(impacted
) / sum(total
) FIXED (BY category
FILTER ALLOW Name
)
Second Group Ratio: sum(impacted
) / sum(total
) FIXED (BY category
FILTER DENY Name
)
Sample dataset below with expected result calculations for validation:
The fixed by functions don't return the expected results in a grouped bar chart with the two ratios. Eg. selecting name = A for the first group and all 3 names for the second group returns 10% for impacted ratio of first group which is correct. But the group 2 ratio comes back as 3% rather than 38%.
I thought it might have to do with a lack of the additional sum function around the fixed by but that fails the beast mode validation.
sum(sum(impacted
) / sum(total
) FIXED (BY category
FILTER DENY Name
))
Comments
-
I since discovered this prior thread with a similar challenge. The difference being the simpler aggregation that doesn't contain embedded calculations for the ratios. https://community-forums.domo.com/main/discussion/56246/compare-two-peer-groups
0 -
Found a lead here to avoid the syntax error from the fixed function containing division.
https://community-forums.domo.com/main/discussion/67010/nested-fixed-functions
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