append the forescaste DT into a DB, adding in columns for lastDateClosed, todays date and runQry("SELECT max(activity_date) from aggregated_analytics")$max ------------ We need to adjust for the "correct" totals. I wanted to do it in DT.mgmtr_summary_tall but it is missing too much meta data. Instead, try adding it to DT.merged or DT.mexpanded ### Compare the totals from the revenue worksheet to the totals from the revenue summaries DT.mainline_group_subtotals_from_rev_summary May <- as.Date("2014-05-01") DT.mainline_group_subtotals_from_rev_summary[.(May)] [, sum(reported_gross)] DT.mgmtr_summary_tall[.(May)][, sum(gross_netSC)] DT.mgmtr_summary_tall[.(May)][music_vs_video_by_dmv == "Video"] DT.mgmtr_summary_tall[.(May)][store_name %like% "[Yy]ou"] # DT.adjustments <- DT.mgmtr_summary_tall[.(May)][, sum(gross_netSC), keyby=c(kCols.SC_date, "ancillaryline", "store_musicbucket", "store_videobucket")] DT.rev_summary.molt[.(May)]