Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Jebilaya
Helper III
Helper III

Column to identify first in sequence

I need to create a column that will identify the first drop on a route based on it being the earliest arrival time for that route number.  Any ideas?

Jebilaya_0-1651830654593.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Jebilaya , New column

 

minx(filter(Table, [Route ID] = earlier( [Route ID] ) ) , [Actual Arrival Time])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

3 REPLIES 3
shephaliB
Advocate II
Advocate II

Hi @Jebilaya ,

Please try the below solution:

First fetch the minimun "First Drop Time" grouping by "Route_ID".

  • Go to Transform -> Group by

shephaliB_0-1651836870360.png

  • Go to the Advanced tab and select as shown below:

shephaliB_1-1651836916781.png

  • This will fetch the first or minimun delivery time in the new column. Then expand the "All" column to get all the columns.

shephaliB_2-1651836966302.png

  • Now you have the "first drop date time" against all the rows. You can then create a custom column (Flag) to compare Actual Arrival time and FirstDrop Time. If both are equal then "Y" else "N". 
  • First Drop(Y/N) = if [Actual Arrival Time] = [FirstDrop Time] then "Y" else "N"

shephaliB_3-1651837034007.png

shephaliB_4-1651837120789.png

Best Resgards,

Shephali Bhuyan

If this post helps, then Accept it as a Solution. Happy to help

amitchandak
Super User
Super User

@Jebilaya , New column

 

minx(filter(Table, [Route ID] = earlier( [Route ID] ) ) , [Actual Arrival Time])

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

This worked perfectly thanks

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.