Running Total Distinct over time
Hi!
I have data for trainings/sessions that have been held over the last year, specifically who attended them.
I would like to visualize how many more unique attendees we are having every session, on each internal team. When I do a distinct count of attendees over time (a running total line graph), it gives me the running total sum of distinct attendees for each session, not session to session. The main question I would like to answer is: are the same people attending these sessions? Or are we attracting new people that are attending? If new people are attending, what team are they on?
Is what I am trying to visualize possible in Domo?
Here is an example use case:
Mary and Bill from Team A attended Session #1
Alex from Team B attended Session #1
Mary, Bill, and Jane attended Session #2
Alex from Team B attended Session #2
Team A had 2 unique attendees in Session #1
Team B had 1 unique attendee in Session #1
Team A had 1 unique attendee in Session #2, Running Total: 3
Team B had 0 unique attendees in Session #2, Running Total: 1
Best Answer
-
I think I might use something like this in a MySql transform:
SELECT *
, (SELECT COUNT(1) FROM `attendees` p
WHERE p.`Email`=s.`Email`
AND p.`Event Date`<s.`Event Date`
) AS 'Previous Attendance Count'
FROM `attendees` sThis will give me a count of how many sessions they have attended, with the first one being '0'. Anything greater than 0 can be a non-unique attendee.
1
Answers
-
I don't think any permutation of COUNT DISTINCT in beast modes will get you the answer you're looking for.
I solve this problem with ETL like this.Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0 -
I'm not sure if I totally understand how I could use the percent of the total. This would assume that I know how many people could possibly attend, which I do not.
Basically, I need to know out of all the attendees for each session, how many have already attended any previous session.
0 -
I think I might use something like this in a MySql transform:
SELECT *
, (SELECT COUNT(1) FROM `attendees` p
WHERE p.`Email`=s.`Email`
AND p.`Event Date`<s.`Event Date`
) AS 'Previous Attendance Count'
FROM `attendees` sThis will give me a count of how many sessions they have attended, with the first one being '0'. Anything greater than 0 can be a non-unique attendee.
1
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
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 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