Aggregate Multiple Text-based Columns to Card
Hello Domo Community!
Long time reader, first time poster... hoping someone out there might have a solution for a relative newbie to domo and using beastmode.
The Sitch
I'm working with a file right now that will show pass/fail results across multiple columns. Each column represents a different category of failure, and the data in that column may either be blank (meaning non fail on that entry for that particular fail type), or it could have text. Here is the example ----->
Some of the 'fails' are due to a single category (column) some are multple.
What do I wanna do?
I would like to do one of two things with this data (a basic version, OR, a more advanced version) -- i'm MORE than content with the basic, but posting both in case anyone is feeling particularly codey today
Comments
-
I would suggest you look into either of these options and see what makes the most sense for you. Both of them revolve around taking data from multiple columns and putting them in a single column.
Approach 1 - Use the Magic ETL Collapse Columns tile
This KB article does a nice job of outlining how you do this. You could create a new column called FailReason and pivot each reason to that column. It would also allow you to rename certain reasons, which you indicated you want to do.
Approach 2 - Create a beast mode called FailReason
You could create a beast mode that would essentially do the same thing except that you will run into challenges when someone has multiple failures because beast modes can't pivot data and you would have to concatenate multiple reasons. Your beast mode would be a long CASE statement that would look at each column and allow you to rename a reason. A simple example would look like this:
CASE WHEN LEFT('Fail1',2) = 'A1' THEN 'Spacing'
WHEN LEFT('Fail1',2) = 'A2' THEN 'Something else'
ENDAfter writing this out, the Collapse Columns would be your best approach to ensure you can total each fail type individually.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.0 -
@MarkSnodgrass nailed it on the head.
build a lookup table that has one row for each failure code and how you want them remapped. (cols. FailReason, FailReason_CustomGroup)
then Magic + Collapse columns will be the easiest way to collapse your data.
then JOIN the lookup and the MagicETL column
to avoid inflating your failure counts
(ex for one ID I could failed A14 and B21 on separate rows)
YOU CAN EITHER:
use a RANK & WINDOW tile to ROW_NUMBER() partitioned by ID, FailReason_CustomGroup
That way in your visulaization you can filter by the first instance of each CustomGroup per ID.
OR
use a GROUP BY tile to concatenate FailReason into one string partitioned by ID, FailReason_CustomGroup
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
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 294 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 607 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 707 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive