new function in expense model, to compute for users expense graph.