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
Matt22365
Resolver III
Resolver III

calculate Date filter

Hi,

I hope someone can help

I am using a measure to filter data in a table by a date column, however the filter is not working

 

I want to count the amount of rows in a table where one column is "criteria 1" and another date colum is "this year". The formula accurately seperates "criteria 1" but does not filter by year

 
Count No Opened = CALCULATE(COUNTROWS('DataBase'),'DataBase'[Criteria]="Criteria 1",Year('DataBase'[Date Opened]=YEAR(TODAY())))
 
Can someone help me correct the 2nd filter section of the formula please?
 
Thanks
 
Matt
1 ACCEPTED SOLUTION
az38
Community Champion
Community Champion

Hi @Matt22365 

I dont see a symbol ")" in your Year('DataBase'[Date Opened] statement

try

Count No Opened = CALCULATE(COUNTROWS('DataBase'),'DataBase'[Criteria]="Criteria 1",Year('DataBase'[Date Opened])=YEAR(TODAY()))

do not hesitate to kudo useful posts and mark solutions as solution
Linkedin

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

2 REPLIES 2
az38
Community Champion
Community Champion

Hi @Matt22365 

I dont see a symbol ")" in your Year('DataBase'[Date Opened] statement

try

Count No Opened = CALCULATE(COUNTROWS('DataBase'),'DataBase'[Criteria]="Criteria 1",Year('DataBase'[Date Opened])=YEAR(TODAY()))

do not hesitate to kudo useful posts and mark solutions as solution
Linkedin

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hi @az38 

 

Thank you! That worked great

 

Matt

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.