Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Calculate data by filter year (help)

hello, I am updating my report from 2021 to 2022 and I am having some problems... for example I need the results delivered to be based on the year selected

Jos_Valds_0-1641957962668.png

the formulas I currently have are as follows:

HH = CALCULATE(COUNTROWS(HH),HH[año]="2021" (I need to add the year 2022, and modify it in the database, as I show in the image below)
Jos_Valds_1-1641958152238.png
IF = calculate(([CTP]+[FATAL])*1000000/(SUM(HH[HH]))) when occupying this formula, it considers me all man hours (hh), so I need to decriminalize according to year
Thank you

  • Hi Syndicate_Admin 

     

    If you want to add 2022 to the countrows you can use this:

    CALCULATE(COUNTROWS(HH),Filter(HH,HH[año]="2021"&&HH[año]="2021"))

     

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/

     

     

1 Reply

  • Hi Syndicate_Admin 

     

    If you want to add 2022 to the countrows you can use this:

    CALCULATE(COUNTROWS(HH),Filter(HH,HH[año]="2021"&&HH[año]="2021"))

     

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/