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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dogt1225
Helper II
Helper II

Average Days to Resolve by Fiscal Week

Hi All, 

I am looking to create a bar chart for the Average Days to Resolve(ADR) a ticket per Fiscal Week and a line that has the Running Average. Exactly like the screen shot below. 

ADR = cumulative sum of days to resolve / Total resolved ticket


I currently have a [Days to Resolve] field = DATEDIFF(Dataset[Submitted_Date], Dataset[Date Resolved], DAY). And I currently have a separate Calendar table that has Date, Fiscal Year, and Fiscal Week


Sample data set listed below Based on the sample data set, for the week of August 22 -August 28 2020 the ADR should be 58 days. 

 

IDSubmitted DateDate Resolved
12/17/20208/26/2020
22/27/20208/27/2020
34/29/20208/24/2020
44/30/20208/24/2020
55/4/20208/24/2020
65/7/20208/26/2020
75/22/20208/24/2020
86/4/20208/28/2020
96/10/20208/24/2020
106/11/20208/28/2020
117/9/20208/24/2020
127/14/20208/27/2020
137/21/20208/24/2020
148/4/20208/27/2020
158/5/20208/28/2020
168/10/20208/24/2020
178/11/20208/24/2020
188/14/20208/24/2020
198/19/20208/25/2020
208/21/20208/28/2020
218/24/20208/27/2020
228/26/20208/27/2020
238/27/20208/27/2020
248/27/20208/28/2020
252/9/20207/4/2020
265/20/20207/26/2020
277/4/20208/1/2020
288/10/20208/11/2020


Thank you in advance!

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@dogt1225 - I get 57.75 for my ADR for that week! 🙂

 

Anyway, take a look at the attached PBIX file below my sig, Page 16, Table 16, Measure 16:

Measure 16 = 
    VAR __Table = 
        ADDCOLUMNS(
            FILTER('Table (16)',[Date Resolved]<=MAX('Calendar'[Date]) && [Date Resolved]>=MIN('Calendar'[Date])),
            "Days",([Date Resolved] - [Submitted Date]) * 1.
        )
RETURN
    DIVIDE(SUMX(__Table,[Days]),COUNTROWS(__Table),0)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@dogt1225 - I get 57.75 for my ADR for that week! 🙂

 

Anyway, take a look at the attached PBIX file below my sig, Page 16, Table 16, Measure 16:

Measure 16 = 
    VAR __Table = 
        ADDCOLUMNS(
            FILTER('Table (16)',[Date Resolved]<=MAX('Calendar'[Date]) && [Date Resolved]>=MIN('Calendar'[Date])),
            "Days",([Date Resolved] - [Submitted Date]) * 1.
        )
RETURN
    DIVIDE(SUMX(__Table,[Days]),COUNTROWS(__Table),0)

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
v-shex-msft
Community Support
Community Support

HI @dogt1225,

You can take a look at following link to create a expand table with detail records of date ranges, then you simply filter on new table fields to get dynamic result:

Spread revenue across period based on start and end date, slice and dase this using different dates 

Regards.

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@dogt1225 , You might have to use Date Resolved for this. Join both dates with date table and use userelation 

 

ADR = calculate(Divide(Sumx(Dataset,DATEDIFF(Dataset[Submitted_Date], Dataset[Date Resolved], DAY)),count(Table[ID])), userelation(Date[date],Table[Date Resolved]))

 

Refer

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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