Return most recent row/date
Good morning.
Been running down the rabbit hole for a day or two on this and trying different solutions from previous Domo questions without much success. I have a sheet that has multiple entries for each equipment number and in the end I would like one row for each piece of equipment that is the most recent EVENTTIME. Preferably I'd like to have it done in ETL so I can make this sheet available to others in the org for making cards:
(Highlighted rows are the ones that should be returned in this example)
Best Answers
-
@AdamC You can use a Rank & Window tile:
https://domohelp.domo.com/hc/en-us/articles/360042922814-Old-Magic-ETL-Tiles-Rank-and-Window
Using Row Number as the function, then ordering by EVENTTIME descending, and partitioning by EQUIPMENT_NUMBER. This new column that's created will assign the most recent date for each equipment number a value of 1 and you can just filter to only allow where the row number is 1.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
3 -
@AdamC You should be able to accomplish this with the Rank & Window tile using a Rank function, ordered by EVENTTIME (descending), and partitioned by EQUIPMENT_NUMBER. This will return the most recent event for each piece of equipment with a rank of 1.
https://domohelp.domo.com/hc/en-us/articles/360044876094-Magic-ETL-Tiles-Aggregate#4.1.
2
Answers
-
@AdamC You can use a Rank & Window tile:
https://domohelp.domo.com/hc/en-us/articles/360042922814-Old-Magic-ETL-Tiles-Rank-and-Window
Using Row Number as the function, then ordering by EVENTTIME descending, and partitioning by EQUIPMENT_NUMBER. This new column that's created will assign the most recent date for each equipment number a value of 1 and you can just filter to only allow where the row number is 1.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**
3 -
@AdamC You should be able to accomplish this with the Rank & Window tile using a Rank function, ordered by EVENTTIME (descending), and partitioned by EQUIPMENT_NUMBER. This will return the most recent event for each piece of equipment with a rank of 1.
https://domohelp.domo.com/hc/en-us/articles/360044876094-Magic-ETL-Tiles-Aggregate#4.1.
2 -
Well what in the world... I tried to do that same thing here a few times the other day and couldn't get it to work. I must have had some of the column names in the wrong places. But that worked perfectly.
Thanks much!!
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