added calculate variance functionaility for a given category and date range