Question on acceptance rate calc
Hello, I am trying to calculate total accpetance rate of the students.
I have 2 calculated fields
Accepted Students: case when (acceptance_flag = 1) then count(students)
Total Students: count(students)
I am having a table format and calculation for acceptance rate:
(case when (acceptance_flag = 1) then count(students) )/count(students) * 100
With this, I always get 100% for the every record that is true. Please help with the calculation that needs to be used.
Best Answer
-
Try this:
COUNT(CASE WHEN `acceptance_flag` = 1 THEN `students` END) / COUNT(`students`) * 100If I solved your problem, please select "yes" above
0
Answers
-
Try this:
COUNT(CASE WHEN `acceptance_flag` = 1 THEN `students` END) / COUNT(`students`) * 100If I solved your problem, please select "yes" above
0 -
Thank you @ColemenWilson . As suggested by you, I tried this -
COUNT(CASE WHEN Acceptance_flag= 1 THEN
Students
END))/COUNT(Students
))* 100 It still gives me as 100% for every student which is true. Else 0%. Not sure if I am missing anything.It is not taking the total into consideration in denominator. I have done this in Tableau using LOD, just not sure on how to get this to work in Domo. Thanks again for looking into this.
0 -
What is the students field? Is that the number of students, or is it some other value? Is it numeric or text?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
What does the data for `Students` look like? Is it a student id? Or is it a number that represents the number of students? Also I noticed missing (or extra) parentheses in your beastmode in your most recent comment - so double check that.
If I solved your problem, please select "yes" above
0 -
@GrantSmith @ColemenWilson Thank you for your response
The original datatype is text. But then in beast mode I am trying to do count() which becomes numeric.
Yes, the missing parentheses was a typo above. In Domo, I did not have any compilation errors. Thank you!
0 -
Sorry for the confusion. I will use a KPI box with the above calculation. It works great. Thank you both.
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 618 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 741 Beast Mode
- 58 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
- 395 Distribute
- 113 Domo Everywhere
- 276 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