The gain from the sale of an investment would be capital gain on Schedule D (Form 1040 Line 7). The loss from a partnership would be a passive loss on Schedule E (Form 1040 Line 8). While the two types of income would not directly offset each other, they may combine to lower your taxable income if you're able to claim the passive loss.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"