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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive