Skip to main content

Notifications

Announcements

No record found.

Customer Insights - Data forum
Unanswered

Case Age between two dates excluding holiday and weekends

Posted on by 67
Hello
 
I want to:
a. calculate the case age between two dates (created on Date and Completed On date), if the status = Close or Resolved or Cancelled Or
b. Calculate the case age between two dates (created On and Today), if the status = Active
 
in Power BI, with the exclusion of holidays and Weekends.
 
Please note that I have a table which i have created a calendar table where I have specified the workdays and holidays and weekends. See screen shot below.
 
 
Specifically, can someone please help me with the formula to calculate the Case Age in Power BI?
 
this query gives me error, can someone help me correct it
 
Age = IF(Intakes[value.statecode@OData.Community.Display.V1.FormattedValue]=/Active/,
IF(CALENDAR([Work Hours]>0,
DATEDIFF(Intakes[value.createdon@OData.Community.Display.V1.FormattedValue],TODAY(),DAY))
 
THANK YOU IN ADVANCE

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,339 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,177 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans