Calculating an average usage with Google Sheets

Hello, community, I would really appreciate your help with the following.

I have a sheet with 5k entries. each entry has

  • Number of days since users created an account
  • Number of used credits (max 1000/user)

I aim to see, on average, how many credits were spent in the last 6 months.
What would be the correct approach? I think I will filter registered users from now till 180 days back, and getting an average is incorrect.

Please advise, any ideas are welcome