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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.