Beast Mode Case-When Grouping Not Supporting Occurrence Count

Hoping for an assist on this.
I have a dataset that includes users along with a log entry for each time they viewed something.
I'm trying to create groupings of the number of views to better understand the users. I've had luck with using beast mode case-when in other situations, but for some reason, I'm unable to get it to work with this scenario.
In the first screenshot (1) is the beast mode calculation.
In the second screenshot (2), I have the table that shows that the beast mode field is working. Its accurately grouping each user (email) in terms of the number of views.
When I change the table columns to do a Count on the email field for the View Groupings, all i'm getting is the 250+ grouping with the total view counts.
Any thoughts on what might be causing this?
Screenshot 1:
Screenshot 2:
Screenshot 3:
Welcome!
Answers
-
Can you share the Beast Mode formula for BM View Distinct?
I find that Beast Modes don't do well with CASE statements that have aggregations inside of them. They often need aggregations outside around the CASE statement or no aggregations at all. Most of the time there is a way to rework your Beast Mode to fit those constraints while still achieving your goal. Other times, you can use a FIXED function instead inside a case statement and that will fix things. You can trying changing your BM View Distinct Beast Mode to a FIXED function BY Email Address.Was this comment helpful? Click Agree or Like below.
Did this comment solve your problem? Accept it as the solution!0 -
Hi afieweger
I don't believe what you're looking to do can be achieved with a beast mode, you would have better success doing this in an ETL.
The issue is that your distinct count will count all bm views when you remove the email column and that is why you're ending up with only the 250+ row. Even a FIXED function would not work, because it requires a second aggregation ie SUM(COUNT (DISTINCT `bm view`) FIXED (by email)) and that second aggregation would give the same result.
0 -
If you're goal is to keep them grouped by Email Address, but not show it, you can always hide that column in the General property options.
Was this comment helpful? Click Agree or Like below.
Did this comment solve your problem? Accept it as the solution!0
Welcome!
Welcome!
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 657 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 815 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 81 App Studio
- 45 Variables
- 775 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 81 Workflows
- 23 Code Engine
- 40 AI and Machine Learning
- 20 AI Chat
- 1 AI Playground
- 1 AI Projects and Models
- 18 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 144 Manage
- 140 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive