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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Generate a sequence for Orders each day

Hello! I need some help generating a sequence for orders that restarts each day. Currently I have a sequence column in my xlsx but it counts 1 to end of document. I would like the sequence to be based off of order times and restart each day. 

 

Example of current state:

 

SequenceDateOrderTime
1Feb 15A8:00
2Feb 15B8:01
3Feb 16C8:00
4Feb 17D8:00

 

Example of desired State:

 

SequenceDateOrderTime
1Feb 15A8:00
2Feb 15B8:01
1Feb 16C8:00
1Feb 17D8:00

 

Thanks!

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a new column like

 

countx(filter(Table, [Date] = earlier([Date]) && [Order Time] <= earlier([Order Time]) ),[Order Time])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak 

 

This is pretty close, 

 

This is what I put for the new column

Seq = COUNTX(FILTER(AMSformatted, [Prod Date] = EARLIER([Prod Date]) && [time_seq] <= EARLIER([time_seq])),[time_seq])
 
But it is counting by 2's in some areas
count by 2's.png

 

 and by 1 in other areas 
count by 1.png

 

 
 

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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