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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Pobthams
Frequent Visitor

how can I count rows by time and category.

Screenshot 2021-08-23 at 23.39.58.png

According to the image, I want to create a column that shows the number of previous orders. The orders have to be counted separately by store and reset every day.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Pobthams , Create a new column like

 

countx(filter(Table, [Store] = earlier([Store]) && [date] = earlier([Date]) && [time] < earlier([Time])),[Time])+0

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Pobthams , Create a new column like

 

countx(filter(Table, [Store] = earlier([Store]) && [date] = earlier([Date]) && [time] < earlier([Time])),[Time])+0

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

@amitchandak What if I want to count orders between 3 PM from the day before until the latest order, and reset every day at 3 PM.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors