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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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