Filter metric by Beast mode dimensions

I have a Beast mode that configures source and medium dimensions into broad categories because Google's default channel grouping dimension is incomplete.
(CASE
WHEN Session Medium
LIKE 'cpc' THEN 'Search'
WHEN Session Medium
LIKE 'paidsocial' THEN 'Social'
WHEN Session Source
LIKE 'google' OR Session Source
LIKE 'bing' OR Session Source
LIKE 'yahoo' THEN 'Search'
WHEN Session Source
LIKE 'facebook' OR Session Source
LIKE 'facebook%' OR Session Source
LIKE '%facebook' OR Session Source
LIKE '%facebook%' OR Session Source
LIKE 't.co' OR Session Source
LIKE 'newsin.bio' OR Session Source
LIKE 'linkin.bio' THEN 'Social'
WHEN Session Medium
LIKE 'organic' THEN 'Search'
WHEN Session Medium
LIKE 'social' THEN 'Social'
WHEN Session Medium
LIKE 'PostUp' OR Session Medium
LIKE 'email' OR Session Medium
LIKE 'e-mail' OR Session Medium
LIKE 'newsletter' THEN 'Newsletters'
ELSE 'All Others'
END)
I would like to create Beast modes based on these dimensions to create columns in a table:
Search pageviews
Social pageviews
Newsletter pageviews
Any thoughts on how to set those up, please?
FYI, I know I could do this in a pivot table, but the results are too small to be viewed when I schedule reports to email.
Best Answer
-
@LenLaCara What values do you want in these columns? If you want to see a sum or count, you can set up a beast mode for each column like the ones below and add each one to the table. As a side note, you only need the LIKE operator when you are matching string patterns and using a % wildcard. If the values you are searching for match exactly, you can use either = or in ().
Search Pageviews:
sum(case WHEN Session Source in ('google','bing','yahoo') THEN `PageViews` WHEN Session Medium in ('organic','cpc') THEN `PageViews` end)
Social Pageviews:
sum(case WHEN `Session Medium` = 'paidsocial' THEN `PageViews` WHEN `Session Source` LIKE '%facebook%' then `PageViews` WHEN `Session Source` in ('t.co','newsin.bio','linkin.bio') THEN `PageViews` end)
Newsletter Pageviews:
sum( WHEN Session Medium in ('PostUp','email','e-mail','newsletter') THEN `PageViews` end)
0
Answers
-
@LenLaCara What values do you want in these columns? If you want to see a sum or count, you can set up a beast mode for each column like the ones below and add each one to the table. As a side note, you only need the LIKE operator when you are matching string patterns and using a % wildcard. If the values you are searching for match exactly, you can use either = or in ().
Search Pageviews:
sum(case WHEN Session Source in ('google','bing','yahoo') THEN `PageViews` WHEN Session Medium in ('organic','cpc') THEN `PageViews` end)
Social Pageviews:
sum(case WHEN `Session Medium` = 'paidsocial' THEN `PageViews` WHEN `Session Source` LIKE '%facebook%' then `PageViews` WHEN `Session Source` in ('t.co','newsin.bio','linkin.bio') THEN `PageViews` end)
Newsletter Pageviews:
sum( WHEN Session Medium in ('PostUp','email','e-mail','newsletter') THEN `PageViews` end)
0 -
Perfect. Thank you for your quick response!
0
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
- 655 Datasets
- 114 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 409 Distribute
- 120 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 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