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
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 601 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 689 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 385 Distribute
- 110 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 112 Manage
- 109 Governance & Security
- 8 Domo University
- 25 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive