Forum Discussion

Matt22365's avatar
Matt22365
Resolver III
6 years ago
Solved

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
  • 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

     

2 Replies

  • az38's avatar
    az38
    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