web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding and ordered seq...
Power Apps
Unanswered

Adding and ordered sequence number for duplicates in a data source

(0) ShareShare
ReportReport
Posted on by 254

I have a data source of bins that contain products.  Sometimes there may be duplicate product codes in the data source but each will have a 'created DateTime.  If there are duplicate products I want to be able to add a column that gives the 'sequence' in the order it should be consumed.  IE list of products:

Bin1 P0009 10:05 Sequence1

Bin2 P0021 11:14 Sequence2

Bin3 P0009 12:02 Sequence2

Bin4 P0021 08:44 Sequence1

Bin5 P2007 19:10 Sequence1

Bin6 P0009 18:00 Sequence3

...

 

I want to add that sequence number on the fly using add columns.  I'm not sure how to approach it.  Can someone point me in the right direction?

Categories:
  • trjackson77 Profile Picture
    254 on at

    I have tried the approach of adding a column that counts a filtered subset of the data filtering for the same product code and that the last press date is less than the current press date.  But it seems to return a 0 count every time.

     

    here is the code:

    AddColumns(BB_CONT,"BinName",LookUp(CFG_BBIN, BB_CONT[@BB_Number] = CFG_BBIN[@BB_Number],BB_Name),"UseOrder",CountA(Filter(BB_CONT,BB_CONT[@BB_Product_Code] = ThisRecord.BB_Product_Code, BB_CONT[@BB_Last_Press_DateTime] < ThisRecord.BB_Last_Press_DateTime).BB_Product_Code)+1)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 283

#3
Mohsin Ali Profile Picture

Mohsin Ali 221

Last 30 days Overall leaderboard