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 September 15. Request your voucher.

Reply
lawada
Helper III
Helper III

calculating number of orders between two timings

im trying to calculate the orders that are placed between 10:00 PM and 8:00 AM using the hour function however im getting a blank value . 

 

Capture.PNG

 

can someone help me with this 

2 REPLIES 2
amitchandak
Super User
Super User

@lawada , It need to be OR (|| )

calculate(count(Orders[Order_id]), filter(Orders,hour(orders[placed order date]) >=22 || hour(orders[placed order date]) < 8))

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
Fowmy
Super User
Super User

@lawada 

Try this measure please:

Later Order10 = 

CALCULATE(
    COUNTROWS( Table01 ),
        var __hour = HOUR(Table01[Placed Order Date]) return
        __hour >= 22 || __hour < 8
    
)

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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