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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors