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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
AAMARILLO
Regular Visitor

Count lines with Date as a variable

I have a table or Orders like this:
OrderNumber | InsertionDate | RequiredDeliveryDate | RealDeliveryDate

I would like to create a measure to show, at any time, how many orders are Open (RequiredDeliveryDate in the past and RealDeliveryDate empty or in the future)

Example:

OrderNumber | InsertionDate | RequiredDeliveryDate | RealDeliveryDate
1001                         15/05/2020            16/05/2020                          11/06/2020
1002                         16/06/2020            17/06/2020                          22/06/2020
1003                         20/06/2020             21/06/2020                         05/08/2020
1004                         28/06/2020             29/06/2020                         06/09/2020
1005                         01/07/2020             02/07/2020                         27/09/2020
1006                         08/07/2020             09/07/2020                         08/10/2020
1007                         10/07/2020             11/07/2020                         04/08/2020
1008                         13/07/2020             14/07/2020                         24/11/2020
1009                         10/08/2020             11/08/2020                         05/09/2020
1010                         15/08/2020             16/08/2020                         18/09/2020
1011                         02/09/2020             03/09/2020  
1012                         04/09/2020             05/09/2020                        15/09/2020
1013                         09/09/2020            10/09/2020  
1014                         01/10/2020            02/10/2020  

Expected results:
                                              01-jun                    01-jul                      01-ago                     01-sep                     01-oct
OPEN ORDERS               1                               1                                  4                                    5                                 4


Can you help me?

3 REPLIES 3
AAMARILLO
Regular Visitor

GREAT!!! Simply perfect.

This solutions really function.

Thank you so much!!!!

 

amitchandak
Super User
Super User

@AAMARILLO , Refer to my blog it deals with dates and open between those

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

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

Thank you so much for your reply.

I think this is exactly what I want.

Unfortunately I need to build it in Excel/PowerPivot.

I'm afraid it only runs in PowerBI.

Do you know how to adapt this solution to PowerPivot?

Thanks.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.