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.4K Product Ideas
- 1.4K Ideas Exchange
- 1.4K Connect
- 1.2K Connectors
- 284 Workbench
- 4 Cloud Amplifier
- 4 Federated
- 2.9K Transform
- 88 SQL DataFlows
- 554 Datasets
- 2.2K Magic ETL
- 3.3K Visualize
- 2.3K Charting
- 561 Beast Mode
- 8 App Studio
- 27 Variables
- 577 Automate
- 140 Apps
- 414 APIs & Domo Developer
- 22 Workflows
- 1 DomoAI
- 28 Predict
- 12 Jupyter Workspaces
- 16 R & Python Tiles
- 350 Distribute
- 90 Domo Everywhere
- 258 Scheduled Reports
- 2 Software Integrations
- 91 Manage
- 88 Governance & Security
- 9 Product Release Questions
- Community Forums
- 41 Getting Started
- 27 Community Member Introductions
- 85 Community Announcements
- 4.8K Archive