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.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
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 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