Combining Row Data
Hi everyone!
I've asked this question before and was advised to use a pivot table to combine two rows into one, but that would create new columns which I don't want so I'm going to see if anyone else has a solution. I have a dataset that I built that tracks activity by students at a University and I need to combine two rows together without creating more columns. Currently, one row is for the class and the other is for the lab for the class. The course and lab for the course have different course codes so the only thing the courses have in common is similar names and course numbers.
Is there a way I can combine these courses together while still having all of the students listed? Below is an example of what my output looks like at the moment and then what I would like it to look like.
Please let me know if I need to provide any more information that would help.
Thanks,
Erik
Comments
-
You can use a group_concat formula within the group tile in ETL 2.0:
Add the common data to the identifying column lists (such as user name, firstName, LastName)
and then add these to the aggregated column by formula:
MasterCourse: group_concat(MasterCourses_courseName Separator ' - ')
LastLogin: Max(lastLogin)
MasterCourses_Code: group_concat(MasterCourses_Code Separator ' / ')
This should work.
Best, TJ
1 -
You could utilize a Magic ETL to split out the lab classes and the lecture class, calculate the lecture class out from the lab class course code, join the two datasets together based on the lecture code and username then use a combine column tile to join your two columns together (alternatively you can use a formula tile with CONCAT for more control on how your resulting value is formatted) then use a select columns tile to remove any extra columns you may not want in your resulting dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
@EWold what's the problem you're trying to solve?
It doesn't make sense to me (yet) to combine a lecture and lab (without adding columns) it seems like you'd be assuming that a student cannot attend a lecture and NOT a lab or vice versa. or perhaps get registered for different sections that usually aren't paired together, or fail one quarter and have to retake lab, or have a data entry problem in the system ...
for most analytic cases i can envision, it'd make the most sense to have the data continue to be on separate rows, then do your aggregation in analyzer.
@GrantSmith 's solution would work, but you'd need some version of a FULL OUTER JOIN to accommodate for the above mentioned circustances.
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 -
@jaeW_at_Onyx the class and lab have different org unit IDs but they can't take one without the other which is why I want to combine them. I'm fine doing the aggregation in the analyzer, but I'm unsure as to what those steps would be.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 297 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 614 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 729 Beast Mode
- 53 App Studio
- 40 Variables
- 677 Automate
- 173 Apps
- 451 APIs & Domo Developer
- 45 Workflows
- 8 DomoAI
- 34 Predict
- 14 Jupyter Workspaces
- 20 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 121 Manage
- 118 Governance & Security
- Domo Community Gallery
- 32 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive