The definition of Community Investment that the B Lab Standards Team uses is:
“A community investment is a long-term involvement in a community partnership chosen or created by the company to address social or environmental issues. Contributions may include cash, employee volunteer time, in-kind product donations, use of services or facilities valued at cost to the company, etc.”
In practice, this question emerged out of a need to capture company giving activity that wasn't tax-deductible, so donations that fit that bill may also be relevant.
An example of a methodology to measure community investments that are recognised by B Lab is the LBG Framework.