Beast Mode percentage formula gives different results on map than bar chart
I am trying to make a card that shows percentage of customers cancelling on a map. I am using the following Beast Mode formula to get the percentage of a whole:
sum(case when `Status` = 'Cancelled' then 1 end)/
count(`Status`)
When I display the results on a bar chart, I get results in the expected 0100% range. However, if I want to put this on a map to see cancel % by state, I get values ranging from 33% to 462%. Since I am dividing a subset by the whole dataset, then this number should never go over 100%. Has anyone else had this issue on percentages not displaying correctly on a map card?
Best Answer

This was user error. I had a rogue sorting field that was causing the error. With that removed, everything works as it should.
0
Answers

Hey @user05739!
This is a good question that goes back to how beast mode and the map charts work.
Your beast mode looks correct on the graph type chart because it's utilizing the entire set of data, so while the numerator of the beastmode is using a subset of data, the denominator is counting the entire set.
When you use the map chart type, the data is filtered based on what state you're looking at. Both the numerator AND the denominator are now a subset of data due to it being filtered by state.
That's why you'd see abnormal results on that chart type.
Let me know if this makes sense of if you have any additional questions!
**Say 'Thanks' by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem as 'Accepted Solution'0 
Hey, thanks for your help, but I'm still confused.
If I understand what you are saying, then in theory, the numerator should still be a subset of the denominator. See the example table below:
State Status NC Active CO Active GA Cancelled CO Cancelled CO Active CO Active In this case, Colorado should have 25% cancels and never go above 100% because you cannot have more cancels than you have records. The only instance I would see that could change this is if the numerator were counting all Cancels (2 total; 1 for GA, 1 for CO) over the denominator for only CO. However, I would imagine that Domo is filtering all records by state.
Additionally, if my bar graph is divided by state, then the two of these should be using the same logic for calculation, correct?
0 
This was user error. I had a rogue sorting field that was causing the error. With that removed, everything works as it should.
0
Categories
 All Categories
 1.7K Product Ideas
 1.7K Ideas Exchange
 1.5K Connect
 1.2K Connectors
 292 Workbench
 4 Cloud Amplifier
 8 Federated
 2.8K Transform
 95 SQL DataFlows
 602 Datasets
 2.1K Magic ETL
 3.7K Visualize
 2.4K Charting
 695 Beast Mode
 43 App Studio
 39 Variables
 658 Automate
 170 Apps
 441 APIs & Domo Developer
 42 Workflows
 5 DomoAI
 32 Predict
 12 Jupyter Workspaces
 20 R & Python Tiles
 386 Distribute
 111 Domo Everywhere
 269 Scheduled Reports
 6 Software Integrations
 113 Manage
 110 Governance & Security
 8 Domo University
 30 Product Releases
 Community Forums
 39 Getting Started
 29 Community Member Introductions
 98 Community Announcements
 Domo Community Gallery
 4.8K Archive