Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Dear Team,
i have start and end date need to get SLA between dates consider only working days except public holidays dates.
Solved! Go to Solution.
Hi @Anonymous
Here is a sample file with the solution https://we.tl/t-YHm9uduPCj
Time Took (SLA) =
VAR StartDate = Data[Start date]
VAR EndDate = Data[End Date]
VAR T1 = CALENDAR ( StartDate, EndDate )
VAR T2 = FILTER ( T1, NOT ( WEEKDAY ( [Date], 2 ) IN { 6, 7 } ) )
VAR NumberOfDays = COUNTROWS ( T2 )
VAR TimeDifference = TIMEVALUE ( EndDate - StartDate )
VAR NumberOfHours = HOUR ( TimeDifference )
VAR NumberOfMinutes = MINUTE ( TimeDifference )
VAR NumberOfSeconds = SECOND ( TimeDifference )
RETURN
NumberOfDays & " Day(s) " & NumberOfHours & " H " & NumberOfMinutes & " M " & NumberOfSeconds & " S"
Hi @Anonymous
Here is a sample file with the solution https://we.tl/t-YHm9uduPCj
Time Took (SLA) =
VAR StartDate = Data[Start date]
VAR EndDate = Data[End Date]
VAR T1 = CALENDAR ( StartDate, EndDate )
VAR T2 = FILTER ( T1, NOT ( WEEKDAY ( [Date], 2 ) IN { 6, 7 } ) )
VAR NumberOfDays = COUNTROWS ( T2 )
VAR TimeDifference = TIMEVALUE ( EndDate - StartDate )
VAR NumberOfHours = HOUR ( TimeDifference )
VAR NumberOfMinutes = MINUTE ( TimeDifference )
VAR NumberOfSeconds = SECOND ( TimeDifference )
RETURN
NumberOfDays & " Day(s) " & NumberOfHours & " H " & NumberOfMinutes & " M " & NumberOfSeconds & " S"
@Anonymous , refer if this business hour blog can help
https://exceleratorbi.com.au/calculating-business-hours-using-dax/
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.