CountIf function in Domo
Hello I have a data that contains all the cases submitted and their submission date and in another column it has the approval date which can be in another date/year. I am trying to get the conversion rate (approvals/submissions) for each month, because of the timing they might not happen in the same month.
A pivot table fails to do this since it only has counts it under the same period, but a count if formula is able to do this but I am having a hard time to recreate this on DOMO.
I am trying to recreate the green area
Best Answer
-
Hi @dylang91
You'll need to use an ETL unpivot your data such that your data is in the following format:
CaseID | Date | Type
243339 | 2/10/2021 | Submission
243339 | 2/10/2021 | Approved
...
Then you can use a beast mode to calculate your percentages per month:
CASE WHEN COUNT(CASE WHEN `Type` = 'Submission' THEN `CaseID` END) = 0 THEN 0 ELSE COUNT(CASE WHEN `Type` = 'Submission' THEN `CaseID` END) / COUNT(CASE WHEN `Type` = 'Approved' THEN `CaseID` END) END
Submissions per month:
COUNT(CASE WHEN `Type` = 'Submission' THEN `CaseID` END)
Approvals per month:
COUNT(CASE WHEN `Type` = 'Approved' THEN `CaseID` END)
And plot using your Date field.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1
Answers
-
Hi @dylang91
You'll need to use an ETL unpivot your data such that your data is in the following format:
CaseID | Date | Type
243339 | 2/10/2021 | Submission
243339 | 2/10/2021 | Approved
...
Then you can use a beast mode to calculate your percentages per month:
CASE WHEN COUNT(CASE WHEN `Type` = 'Submission' THEN `CaseID` END) = 0 THEN 0 ELSE COUNT(CASE WHEN `Type` = 'Submission' THEN `CaseID` END) / COUNT(CASE WHEN `Type` = 'Approved' THEN `CaseID` END) END
Submissions per month:
COUNT(CASE WHEN `Type` = 'Submission' THEN `CaseID` END)
Approvals per month:
COUNT(CASE WHEN `Type` = 'Approved' THEN `CaseID` END)
And plot using your Date field.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
You can actually do this in the beast mode and setting your date range filter to group by month of submission date as it sounds like you don't care which month the approval occurred in, just the fact that it was approved. You can get the approvals count by doing a beast mode like this:
SUM(CASE WHEN `ApprovalDate` IS NOT NULL THEN 1 ELSE 0 END)
Then to do a conversion rate, your beast mode would look like this:
SUM(CASE WHEN `ApprovalDate` IS NOT NULL THEN 1 ELSE 0 END) / COUNT(`CaseID`)
Finally, changing your date range filter to graph by month will make your date column display in the format of 2021-Nov, which I believe is what you want.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
@GrantSmith Thank you so much! It took me a second to unpivot the information but it worked like a charm! I appreciate it!
1 -
@MarkSnodgrass I actually needed to identify how many cases were approved this month, which is why I was struggling, because it would only count the ones that were submitted the same month but not the month that were approved. Thank you! :)
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive