Hi Shivani -
There's not a straightforward answer to this question; it's one that many customer service departments consistently wrestle with. One of the reasons is that it's hard to know whether a user would have filed a ticket had they not received an answer in your community. You can assume some percentage of users who ask a question and receive an answer in the community count as deflections. You also want to look at the page views that answers receive, knowing that 90%+ of people who use a community just read and never post. So, some percentage of the people who read answers in your community are also "deflected" just by finding information there.
I hope that helps, and encourage others who track case deflection or interception to chime in with how you calculate the rate or KPI for this.