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.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.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 58 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 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