Multiple Date Columns
So I have a data set that looks basically like this:
And I want to produce a card that counts the number of chats, emails, web, and text tickets by date, but also the number of calls by date. Then I need to sum up all interaction types by date.
So for the above example, I would want this as the output:
Can anyone provide some tips on how I might achieve this with cards? Do I need to create a custom data set to somehow pivot this data into this format? How would you deal with the multiple date columns?
Comments
-
I would probably do this in Magic ETL and do a combination of grouping and pivoting.
You could do a group by tile (on your input) on ticket date and ticket type and count ticket id - then use a pivot tile to create a column for each of your ticket types, which would give you the first half of your table. Then you could do a second group by tile (also from your input) on call date and count call id. Then use a join to join this to the pivot tile output by joining on date. This'll give you the output you're looking for but you lose the transactional detail of the ids.
Alternatively you could restructure your dataset so that every row is a single transaction, which may give more flexibility long term. You could do a select columns tile to select the ticket date, ticket id, ticket type columns, and use a constant tile to add a new constant (i.e. contact_type) and set it to 'Ticket'. Then another select columns to just select ticket id, call date and call id, and add the constant tile for contact_type = 'Call'. I'd rename the ticket_date and call_date columns to 'Date' so they'll be the same when you append. It would look like this:
Then you could do your aggregation in the card via beast modes (or possibly a pivot table), or could use a dataset view and use that to power a card.
0
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.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 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