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.
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
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'
After 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.
use a GROUP BY tile to concatenate FailReason into one string partitioned by ID, FailReason_CustomGroupJae 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
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 472 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 202 Visualize
- 255 Beast Mode
- 2.1K Charting
- 12 Variables
- 83 Cards, Dashboards, Stories
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 180 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive