Beast Mode Calculation used to view data in Table
My question is related to showing Comments/ Verbatim in a Table using a Beast Mode to Apply Business Rule.
In Org Survey, we want to make sure that if we have less than 5 unique comments then don't show the comments. If the Business Rule of >= 5 comment is met, only then show the comments/verbatim.
Below is an example where we have 10 Feedback/Comments/Verbatim.
I tried 4 different Beast Modes -
Unique Count Token = Count(Distinct 'Survey Token ID')
Unique Count Feedback = Count(Distinct 'Feedback')
Count Token = Count('Survey Token ID')
Count Feedback = Count('Feedback')
When used Beast Modes in Filters section in Analyzer it returns following output:
Unique Count Token (Business Rule applied >=5) = No Data
Unique Count Feedback (Business Rule applied >=5) = No Data
Count Token (Business Rule applied >=5) = All Good is the only feedback that shows up
Count Feedback (Business Rule applied >=5) = All Good is the only feedback that shows up
No matter whatever approach I try, it will look for Feedback count >=5, hence I am not getting the expected output.
Survey Token ID | Feedback |
---|---|
A001 | All Good |
A002 | All Good |
A003 | Our Leaders are approchable |
A004 | All Good |
A005 | We have good Cafeteria |
A006 | All Good |
A007 | I have a Good Work-Life Balance |
A008 | I feel I am valued |
A009 | I enjoy doing my Work |
A010 | All Good |
Can someone please advise, how can I handle this scenario using Beast Mode.
Please Note that the Schema is much more complex than what I have shown here and we cannot make any change in the schema.
Best Answer
-
You could try to use a window function to get the total for each bucket/partition and then filter based on that number.
COUNT(DISTINCT `Feedback`) OVER (PARTITION BY `Country`)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
Assume my dataset is:
A001
All Good
A002
All Good
A003
Our Leaders are approchable
A004
All Good
A005
We have good Cafeteria
A006
All Good
A007
I have a Good Work-Life Balance
A008
I feel I am valued
A009
I enjoy doing my Work
A010
All Good
A011
All Good
A012
All Good
A013
I enjoy doing my Work
A014
I enjoy doing my Work
A015
I enjoy doing my Work
A016
I enjoy doing my Work
Feedback Count:
COUNT(`Feedback`)
Feedback Occurrences:
COUNT(`Feedback`)
Filter Based on Count:
CASE
WHEN COUNT(`Feedback`) >= 5 THEN 1
ELSE 0
END** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Sorry, part of that answer was redundant since I made two calculations with the same formula. <:*)
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
What we want is to show all the Feedback if total count of unique feedbacks are >=5 and not just indifidual feedback.
Here is an example of final feedback snapshot for 2 countries. For Country C1 unique feedback is 3, so it should not show any feedback in the table. However for Country C2 we have 5 unique feedbacks, so the table should show the feedback.
Country
Feedback
Total Unique Feedback
C1
All Good
3
Our Leaders are approchable
We have good Cafeteria
C2
All Good
5
Fulfilled work environment
I enjoy doing my Work
I feel I am valued
I have a Good Work-Life Balance
I have tried to simulate the way we have the data. This is not exactly how it is but kind of it. We have the same feedback repeated multiple times because of several demographic information available.
0 -
You could try to use a window function to get the total for each bucket/partition and then filter based on that number.
COUNT(DISTINCT `Feedback`) OVER (PARTITION BY `Country`)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive