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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MiroslawW
Frequent Visitor

Count dates after given date

Hello,

I have got problem to find solution of counting dates after given date. 

 

Table1

NameOption 1Option 2Option 3
Name 117/03/2023  
Name 216/03/2023  
Name 3   
Name 413/03/2023  
Name 5 18/02/2020 
Name 6   
Name 7  17/03/2023
Name 8  16/03/2023
Name 918/03/202013/03/2023 
Name 10   
Name 11   
Name 12   
Name 13  03/12/2021
Name 1401/01/2020  
Name 15   
Name 16   
Name 17  16/03/2022
Name 18   
Name 19   
Name 20 03/12/2021 
Name 2103/12/2021  
Name 22   
Name 23   
Name 24 16/03/2022 
Name 2516/03/2022  
Name 26   
Name 27   
Name 28   

 

I tried to use measure to count: 

Measure 1= CALCULATE(COUNT(Table1[Option 1]), Table1[Option 1]<> BLANK(), Table1[Option 1]>01/01/2023)
That should give me number Measure 1 = 3 but it counts whole column Measure 1 = 7 
Why while calculating this measure it is not dropping dates

 

I tried to look diffrent solution: with countrow, filter but none of them worked. 

 

Any ideas.

 

Regards,

MW

2 ACCEPTED SOLUTIONS
HotChilli
Super User
Super User

The date is not being recognised.  Use DATE(...) instead of just writing 01/01/2023.  The intellisense will help you

View solution in original post

Thanks that worked. 

View solution in original post

3 REPLIES 3
HotChilli
Super User
Super User

The date is not being recognised.  Use DATE(...) instead of just writing 01/01/2023.  The intellisense will help you

Hi,

I tired to make this more automated added this line:

Measure 1= CALCULATE(COUNT(Table1[Option 1]), Table1[Option 1]<> BLANK(), Table1[Option 1]>TODAY())

and this time it shows me some weird numbers.

 

Thanks that worked. 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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