Forum Discussion
Calculate difference between summarized data column and static table
Hi all,
I have actual sales data synched and summarized (date hierarchy -- month) from my SQL server (let's call this Ledger), and a static table that I created with monthly sales targets (let's call this Sales Projections). I want to calculate Ledger - Sales Projections.
I've tried to calculate the the results of numers solutions for taking the difference between columns without any luck.
Does anyone have any ideas on how I may calculate the difference?
Thanks in advance!
5 Replies
- parry2kSuper User
Can you share how those tables are connected and what the columns in those tableS?
- MichaelHearst13Regular Visitor
Sure --
Below is a rough example:
Ledger has hundreds of thousands of lines, connected (green) to a calendar table by each date
Calendar table connects (pink) to a summary Sales Projection table.
- MichaelHearst13Regular Visitor
table 1) Ledger table 2) Calendar/Date Table table 3) Sales Projection trans_date Sales Date MonthNameLong Month Sls/Day Sales (forecasted) 1/1/2017 500 1/1/2017 January January 682 15000 … .. … .. February 650 13000 .. .. .. .. March …. … 2/1/2017 480 2/1/2017 February - parry2kSuper User
Based on what i see, you need to have date in sales projection instead of month and link that date with calendare date table, also ledger will have relation on trans date to date column in calendar table and it should be straight forward from there. let me know if you already tried this.