@harryharrold I've sort of fixed it now. Was using group by fields, which I think was causing it.