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