## Average Days Open Each month, PowerPivot

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

 Ticket Group Created CloseDate Broken Screen West 8/24/2017 4/26/2018 Broken Mouse West 2/4/2018 5/18/2018 Broken Laptop West 3/4/2018 Broken Brain East 3/29/2018 5/20/2018

What I'm trying to achieve is:
 1/31/2018 2/28/2018 3/31/2018 4/30/2018 5/31/2018 West 160 106 99 71 88 Broken Screen 160 188 219 Broken Mouse 24 55 85 Broken Laptop 27 57 88 East 2 32 Broken Brain 2 32

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])), blank(), datediff(max('Ticket'[Created]), max('Calendar'[Date]), day))