[Stumped] Relationships made but formula not working!

natural_cg

New Member
Joined
Jul 19, 2014
Messages
4
I have 2 tables. Relationship is made on campaignID

Table 1 - Clicks
- clickID
- campaignID
- count of clickID
- other_stuff

Table 2 - Campaigns
- campaignID
- campaign_name
- campaign_cpc

I created a calculated field on the clicks table to count clickID (get the number of "views").

However when i try to create a calculated field formula:

<code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">
=Clicks[count of clickID]*Campaigns[campaign_cpc]</code>


I get an error. Is says it needs a relationship. More specifically:


"The value for column 'campaign_cpc' in table 'Campaigns' cannot be determined in the current context"


I already tried using the RELATED() function but it still doesn't work. I get the same error.
I've been at this problem for the past day and would appreciate some guidance.
Thanks
 

Some videos you may like

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

natural_cg

New Member
Joined
Jul 19, 2014
Messages
4
I guess posting this question did it's magic. I finally figured it out!

Here's what i did...

*** I Needed To Add 1 Column To The Campaigns Table

So i just simply created a column at the end of the table which pointed to the "count of clickID".

After this, i was able to perform my original calculation.

So my table looked like this:

Table 1 - Clicks
- clickID
- campaignID
- count of clickID
- other_stuff

Table 2 - Campaigns
- campaignID
- campaign_name
- campaign_cpc
- count_clicks (this point to Clicks[count of clickID] )

Hope this helps someone else out on their journey.

I have 2 tables. Relationship is made on campaignID

Table 1 - Clicks
- clickID
- campaignID
- count of clickID
- other_stuff

Table 2 - Campaigns
- campaignID
- campaign_name
- campaign_cpc

I created a calculated field on the clicks table to count clickID (get the number of "views").

However when i try to create a calculated field formula:

<code style="margin: 0px; padding: 1px 5px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: pre-wrap; background: rgb(238, 238, 238);">
=Clicks[count of clickID]*Campaigns[campaign_cpc]</code>


I get an error. Is says it needs a relationship. More specifically:


"The value for column 'campaign_cpc' in table 'Campaigns' cannot be determined in the current context"


I already tried using the RELATED() function but it still doesn't work. I get the same error.
I've been at this problem for the past day and would appreciate some guidance.
Thanks
 

scottsen

Well-known Member
Joined
Mar 16, 2014
Messages
1,263
You should not need to duplicate the data into your campaigns table. I'm curious what happened when you used RELATED()?
 

natural_cg

New Member
Joined
Jul 19, 2014
Messages
4
I think the way i fixed it wasn't ideal.

I ran into the same situation again! This time with another calculation.

Table 1 - Clicks_
- ClickID
- CampaignID
- DestinationID
- ConversionDate
- IsConversion ("1" or "0")

Table 2 - Destinations
- DestinationID
- CampaignID
- Payout

Here is the relationship:





I do a simple calculation and i get an error...






This should be simple and strait forward... I don't know whats going on. Probably something simple.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,614
Messages
5,523,919
Members
409,542
Latest member
Shezz01

This Week's Hot Topics

Top