help with logic - finding unique number of `column1` that have BOTH value '1' and '2' from `column2`
I am struggling through working out the logic for this. Can anyone help me think through this? There might be an entirely different approach that is much easier.
I am sorting out an email campaign and I want to know how many unique `EmailAddress` show up for BOTH `EmailName` value 'email1' and 'email2' at least 1 time.
(To clarify, this is an open report I am working with, so a new row populates with `EmailName` for each open. so if a person opened 100 times, that would be 100 rows, same `EmailAddress`.)
I created new columns with integers for each of the emails.
So, `Email1Column` is filled with:
CASE WHEN `EmailName` like '%Email 1%'
then 1 else 0 end
`Email2Column` has:
CASE WHEN `EmailName` like '%Email 2%'
then 1 else 0 end
I created a table that has `EmailAddress`, SUM Email1Column and SUM Email2Column as the columns.
I want to filter ONLY the rows that have a value greater than 0 for BOTH Email1Column AND Email2Column.
When I try to put in filters on the visualization, it is just empty (for the same reason I can't use an AND statement - the data is different rows, so >0 for one means excluding the other).
I feel like I am close here. Any help is appreciated.
Comments
-
Hi @cjack-PML
You can't filter on aggregate functions (unless you have an alpha feature enabled to do so but doesn't always work as intended).
What I'd recommend is using an ETL (or a DataView if you're in the beta) to calculate these numbers and then using the resulting dataset to graph where you can filter on the aggregated numbers.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Thanks @GrantSmith for the response.
I did use an ETL to generate those two new columns.
Can you elaborate on what I should do? I am just hitting a wall on thinking this through. Do you mean I should create a column that only includes the greater than 0 rows for each? I suppose that would make sense.
0 -
Hi @cjack-PML
You'd need to do your grouping and aggregation within your ETL using a GROUP BY tile and creating two new fields (email 1 min and email 2 min). Then add both together using a calculator tile. If the new value is 2 then they both would exist and you can then use that new field to filter on in your cards.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**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