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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.