It seems like such an easy thing: As I would do in excel, I just want to use a cell in my row to determine which column to return value from.
An example of my (VERY simplified) table "tTable" is:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Part[/TD]
[TD]Default Vendor[/TD]
[TD]Supplier1[/TD]
[TD]Supplier2[/TD]
[TD]Supplier3[/TD]
[TD]Price @ Default Supplier[/TD]
[/TR]
[TR]
[TD]Material1[/TD]
[TD]Supplier1[/TD]
[TD]1.00[/TD]
[TD]1.25[/TD]
[TD]1.30[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Material2[/TD]
[TD]Supplier2[/TD]
[TD]4.10[/TD]
[TD]4.00[/TD]
[TD]4.15[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Material3[/TD]
[TD]Supplier3[/TD]
[TD]3.70[/TD]
[TD]3.40[/TD]
[TD]3.00[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In excel I would write this in F2:
=VLOOKUP([@Part], tTable, MATCH([@Vendor],tTable[#Headers],0), FALSE) = $1.00
OR
=ADDRESS(ROW(),COLUMN(INDIRECT("tTable["&tTable[@Vendor]&"]")))=$1.00
However, I'm trying to do this same thing in PowerPivot. My data is essentially the same. What I WANT to do is:
=LOOKUPVALUE(INDIRECT("tTable["&[Vendor]&"]"), [Part], [Part])
Which obviously doesn't work. I am out of ideas and cannot find a solution online. Excel does not work since the data set is far too large, and powerpivot is my only alternative.
Is there a formula for looking up a dynamic column in PowerPivot?
An example of my (VERY simplified) table "tTable" is:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Part[/TD]
[TD]Default Vendor[/TD]
[TD]Supplier1[/TD]
[TD]Supplier2[/TD]
[TD]Supplier3[/TD]
[TD]Price @ Default Supplier[/TD]
[/TR]
[TR]
[TD]Material1[/TD]
[TD]Supplier1[/TD]
[TD]1.00[/TD]
[TD]1.25[/TD]
[TD]1.30[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Material2[/TD]
[TD]Supplier2[/TD]
[TD]4.10[/TD]
[TD]4.00[/TD]
[TD]4.15[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Material3[/TD]
[TD]Supplier3[/TD]
[TD]3.70[/TD]
[TD]3.40[/TD]
[TD]3.00[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
In excel I would write this in F2:
=VLOOKUP([@Part], tTable, MATCH([@Vendor],tTable[#Headers],0), FALSE) = $1.00
OR
=ADDRESS(ROW(),COLUMN(INDIRECT("tTable["&tTable[@Vendor]&"]")))=$1.00
However, I'm trying to do this same thing in PowerPivot. My data is essentially the same. What I WANT to do is:
=LOOKUPVALUE(INDIRECT("tTable["&[Vendor]&"]"), [Part], [Part])
Which obviously doesn't work. I am out of ideas and cannot find a solution online. Excel does not work since the data set is far too large, and powerpivot is my only alternative.
Is there a formula for looking up a dynamic column in PowerPivot?