PowerPivot RELATED function with dynamic column reference

tryamamoto

New Member
Joined
Oct 20, 2010
Messages
1
Is it possible to create a calculated column in a PowerPivot table using the RELATED function and a dynamic column reference? In Excel, I used an Index-Match arrangement to pull the appropriate category from my dimension matrix, but have been unable to adapt this particular requirement to PowerPivot.

Here's an example of what I am trying to acheive.

Example.jpg


If I use the formula '=RELATED(DIM[Text1])', CalcColumn returns the correct value of "AA" for row1 and "CC" for row3; however, the problem of course is that the "Text1" column of the DIM table is referenced for all rows, which does not produce the desired result (Returns BB and DD instead of FF and NN respectively in the illustration above). What I need is a way (appropriate syntax) to reference the CODE column in the formula for CalcColumn (e.g. '=RELATED(DIM[FACT
Code:
]') so that CalcColumn will look to a different DIM column based on the value in the CODE column.
 
I'm thinking I might be trying to make PowerPivot do something it isn't intended for, but, if there is a way to make this work in PowerPivot, any help to point me in the right direction would be most appreciatied.
 
Thanks,
 
Tak
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,215,463
Messages
6,124,963
Members
449,200
Latest member
indiansth

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