I am trying to get an average count based on grouped items. I have a list view that allows the user to select a field from a menu to show them numbers based on the group. So if they select Issue Type, Each Issue would then come up with a couple of counts (In Progress, On-Hold, Resolved) based on filters, which is working and then an Average Resolution Time. I can get an average resolution time for the entire count but not individually. I have included the xsl value I am using to try and filter the resolution time based on the field selected for grouping. I have a feeling I am just putting the fiter criteria in the wrong spot but I cannot seem to get it working, below is the only thing that I have tried that came up with no XSL error.
<xsl:value-of select="format-number(sum(/dsQueryResponse/Rows/Row/@ResolveTime[@Issue_x0020_Pertains_x0020_To = $countType]) div count(/dsQueryResponse/Rows/Row/@ResolveTime[@Issue_x0020_Pertains_x0020_To = $countType]), "#,##0.00;-#,##0.00")"/>