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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

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

@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
Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors