[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
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
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
 
Upvote 0
You should not need to duplicate the data into your campaigns table. I'm curious what happened when you used RELATED()?
 
Upvote 0
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:

2014-09-23_1056.png




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



2014-09-23_1105.png



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

Forum statistics

Threads
1,214,914
Messages
6,122,211
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top