Beast Mode

Beast Mode

Beast Mode Case-When Grouping Not Supporting Occurrence Count

Member
edited April 15 in Beast Mode

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:

image.png

Screenshot 2:

image.png

Screenshot 3:

image.png

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In

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!

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

  • 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!

Welcome!

It looks like you're new here. Members get access to exclusive content, events, rewards, and more. Sign in or register to get started.
Sign In