Affine processes possess the property that expectations of exponential affine transformations are given by a set of Riccati differential equations, which is the main feature of this popular class of processes. In this paper we generalise these results for expectations of more general transformations. This is of interest in, e.g. doubly stochastic Markov models, in particular in life insurance. When using affine processes for modelling the transition rates and interest rate, the results presented allow for easy calculation of transition probabilities and expected present values.