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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.