Case Statement help
I have an ETL with several joins and calculations. My final output is good except for this last piece: I would like to identify in a formula that when the "ID" column has the same # but the "Status" column is different, then I want to keep the status result from the "last update date" column. Is there a formula I can use for this?
Best Answers
-
@user028582 Can you please share an example of what your data looks like and the desired result, removing any sensitive information? That will help us answer your question more effectively.
1 -
Take a Group By tile to group by the ID and Status Fields, take the MAX of your UPDATED field then inner join your data back into your original dataset based on the ID, Status Fields, and where the UPDATE fields match. This will remove any records where it's not the last updated value.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Take the output from the last formula tile and feed that into a group by tile. Then feed the output of that and the same formula tile to a Join tile and do the inner join. Then take the output of the join and feed it to your output dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2
Answers
-
@user028582 Can you please share an example of what your data looks like and the desired result, removing any sensitive information? That will help us answer your question more effectively.
1 -
I yes, from the highlighted rows I want to keep the second row. I highliighted the column headings I would use to make this determination
Note, there is not always a "closed" option, sometimes the two rows will both say "open" but then I would need the latest updated row.
This is the ETL (don't judge I'm brand new at this 😂) I'm sure there is an easier way to do this!
0 -
0
-
Take a Group By tile to group by the ID and Status Fields, take the MAX of your UPDATED field then inner join your data back into your original dataset based on the ID, Status Fields, and where the UPDATE fields match. This will remove any records where it's not the last updated value.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**1 -
Grant thank you! I have never done a "group by" before. On my ETL where would I put the group by tile (connected to what?) and would I connect it back to "All State Resolutions" using an inner join? Thank you so much for your help
0 -
Take the output from the last formula tile and feed that into a group by tile. Then feed the output of that and the same formula tile to a Join tile and do the inner join. Then take the output of the join and feed it to your output dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
It worked THANK YOU SO MUCH!!
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 755 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive