Forum Discussion
Creating a calculated column from another table based on date criteria
Example file with Sales and Mailers Tables
Example End Product Conversion Chart by Campaign
Background:
We help boat dealers sell boats, we do marketing for them.
I have 2 tables:
- Mailer table – telling us who we physically mailed a marketing campaign to (as well as details on the mailer)
- Sales Table – telling us who actually bought our widget
Problem:
I'm looking to visualize conversions by different physical mail "Campaign" we send out. Right now there’s no column in our Sales table that says which campaign resulted in a sale.
I need to add a “Last attributed Campaign” column in my Sales Table so I can look at (Count of campaign type mailed [Mailers Table]) /(Count of campaign type resulting in a sale [Sales Table]) – to get conversion by campaign. All I need is the column in the sales table to do this.
Complex If / Vlookup type request
- How can we add a “Last Attributed Campaign” column into the Sales table with the below conditions?
- Look at the “Deal Date” in the Sales Table, and if it is on the 13th of the month or before, then the column should return the Campaign from the previous month or earlier, whatever is latest.
- For example, if someone bought a boat on May 5th, we want to attribute that Boat sale to the "Campaign" that was sent before May.
- If the deal date is on the 14th of the month or after, simply return the most recent "Campaign" sent – could be the same month
- Every row in the Sales table should be filled in based on what’s in the Mailer table.
Anonymous attached with this reply.
17 Replies
- parry2kSuper User
Anonymous quick question, I think you want to get the campaign id based on store / customer, not only just dealdate
- AnonymousNot applicable
Hi parry2k - Yes, you are right, sorry for the confusion!
Basically the last Campaign the customer received before they actually bought a boat, based on those date criterias.
- parry2kSuper User
Anonymous how about store? Does that matter? I noticed campaigns are by store
- AnonymousNot applicable
I reviewed this post when I was researching my problem but I think it is off point. I have a string of tables that are related to one another Booking => Order => Division. I am trying to create a calculated column in my Booking table based on something in my Division table. I beleive I need to create two related statements with the lookupvalue statement but am not sure how to do this.