Approximated analytical calculations of loss distributions and risk measures are often accurate with factor models when portfolios become more fine-grained. Such calculations can be improved by granularity adjustment (GA) techniques if there remains a significant amount of undiversified idiosyncratic risk. We explain why it is so difficult to obtain analytic approximations of risk measures through granularity adjustment, when the underlying portfolio losses depend on several systematic factors. We propose several flexible families of models to manage the market and/or the counterparty risk of portfolios of financial assets. Explicit closed-form formulas based on GA techniques are provided, to approximate value-at-risks. We take into account random exposures, random recoveries and default risk simultaneously. Such models can be applied to portfolios of bonds, loans, stocks or even derivatives. We prove the accuracy of such analytic approximations through simulations, when the vectors of systematic factors are Gaussian or elliptical, more generally.