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
- 10.6K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 474 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 478 Datasets
- 214 Visualize
- 259 Beast Mode
- 2.1K Charting
- 12 Variables
- 19 Automate
- 356 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 248 Distribute
- 64 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 189 Product Ideas
- 1.2K Ideas Exchange
- 11 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive