Average Days Open Each month, PowerPivot

teddy0bear

New Member
Joined
Aug 26, 2016
Messages
4
I'm looking at calculating how many days a ticket has been open and the average days all the tickets have been open for that month and group. I have a date table that is not connected a ticket table

TicketGroupCreatedCloseDate
Broken ScreenWest8/24/20174/26/2018
Broken MouseWest2/4/20185/18/2018
Broken LaptopWest3/4/2018
Broken BrainEast3/29/20185/20/2018

<tbody>
</tbody>


What I'm trying to achieve is:
1/31/20182/28/20183/31/20184/30/20185/31/2018
West160106997188
Broken Screen160188219
Broken Mouse245585
Broken Laptop275788
East232
Broken Brain232

<tbody>
</tbody>


I'm getting close, I think, I have a DAX measure that will calculate the days open but it's not averaging them per team and I'm not sure how to make it. It's currently returning the last ticket values. Which, sort of makes sense but is not what I want. Can anyone tell what I'm doing wrong or if there is a better way to do this?

The formula I currently have is:

=if(or(max(Ticket[CloseDate])<MAX('Calendar'[Date]), max(Ticket[Created])>max('Calendar'[Date])), blank(), datediff(max('Ticket'[Created]), max('Calendar'[Date]), day))
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,213,504
Messages
6,114,016
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top