Was struggling with difference of total between given solution and my solution..later found that the date was used wrongly and was considered from July and not June.
Attaching the simplified solution that uses only "FindReplace", "Filter" and "summarize" tools.