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.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
- 755 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