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
Syndicate_Admin
Administrator
Administrator

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

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

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/

 

 

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

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/

 

 

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.