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! Request now

Reply
Anonymous
Not applicable

Subtract if statement from a measure (working days)

Is there a way to replace 2.5 in Measure 5.0 with this IF statement [Rules]?

 

Measure 5.0 =
VAR _Month = CALCULATE(COUNT(DimDate[Days in Month]),FILTER(DimDate,'DimDate'[WorkingDays] <>BLANK()))
VAR _lastday=
COUNTROWS(
FILTER(DimDate,'DimDate'[WorkingDays] <>BLANK()))-2.5
RETURN
IF ( ISBLANK ( [AbsentByDay] ), BLANK (), _lastday )

 

 

Rules =
VAR searcind = SEARCH("Industr",'Query1'[GRADE_NAME],1,BLANK())
VAR searcnotind = FIND("Industr",'Query1'[GRADE_NAME],1,-1)
VAR duration510 = IF(searcind<>BLANK(),IF(AND('Query1'[Total Years - Employment] >=0,'Query1'[Total Years - Employment] <5),CALCULATE(23.5/12),BLANK()),BLANK())
VAR notindnot10 = IF(AND('Query1'[Total Years - Employment] <10,searcnotind),CALCULATE(25/12))
VAR ind5 = IF(AND('Query1'[Total Years - Employment] >= 5,searcind),CALCULATE(25.5/12),duration510)
VAR notind10 = IF(AND('Query1'[Total Years - Employment] >= 10,searcnotind),CALCULATE(30/12),notindnot10)
RETURN
IF(ind5<>BLANK(),ind5,notind10)

 

 

 

https://www.dropbox.com/s/xjagu2e89p5fe4a/Sample4.pbix?dl=0

1 REPLY 1
vivran22
Community Champion
Community Champion

Hello @Anonymous 

 

What exactly you want to replace it with?

 

Cheers!
Vivek

Blog: vivran.in/my-blog
Connect on LinkedIn
Follow on Twitter

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.