Look up based on 2 seperate columns

mdrew9

Board Regular
Joined
Mar 4, 2006
Messages
118
Not sure if my title is the proper way to describe this.
I have a data table it has 2 columns, Activity and Element. I am trying to "look up" what this record is based on these values. This would be very simple if it was just activity, but its conditional first on element.
What I want to do is this
=IFERROR(VLOOKUP(E6,tblElement,2,FALSE),VLOOKUP(D6,tblActivity,2,FALSE)) In excel this works.

=IFERROR(related(tblElement[Color]),related(Activity[Color])) In Powerpivot this does not work because there is no error

I could also put this in Access as a query before bringing it into PP, so that is also an option.

Also typically in my pivot table I would just include the Color column as on of my fields, so I am calculated what each record is at each line. Not sure if there is a way around this.
 
Last edited:
Mavericks tblelement and tblactivity are not related they refer to 2 different types of codes.

Creating a relationship between your fact table and each of these columns should make your life easier.
YourFactTable ->tblActivity
YourFactTable -> tblElement
 
Upvote 0

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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