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.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