Can Related and Filter be used in the same formula to filter a value?

LBala

New Member
Joined
Apr 3, 2014
Messages
22
Hi all;

I have a simple power pivot report with two tables (Table1 and Table2 below) connected by the field "Item".
I need to create a calculated column in the Table2 called "StoreB_Quantity" that shows the quantity the store B has of a certain product. I tried using the RELATED and FILTER functions together but could not put both working to show the results listed in the Table2.

How would the formula be under StoreB_Quantity below to show those results?

Thanks.


Table1:

StoreItemQuantity
ABanana2
BBanana5
CBanana8
DBanana1
AMelon0
BMelon3
CMelon6
DMelon4
AApple12
BApple7
CApple9
DApple2

<tbody>
</tbody>

Table2:
ItemStoreB_Quantity
Banana5
Melon3
Apple7

<tbody>
</tbody>
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
What I need is a formula for the calculated column StoreB_Quantity in the Table2 that looks up the Table1 and gives me the the quantity of each item Store B has.


Basically, the formula needs to filter only the Store B in the Table 1.
 
Upvote 0
What I need is a formula for the calculated column StoreB_Quantity in the Table2 that looks up the Table1 and gives me the the quantity of each item Store B has.

That is what you think you need, but it is not what you need. You have interpreted the problem and come up with a solution that is not ideal. This solution will give you a new column in your first table like this


StoreItemQuantity StoreB
ABanana25
BBanana55
CBanana85
DBanana15
AMelon03
BMelon33
CMelon63
DMelon43
AApple127
BApple77
CApple97
DApple27

<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>
</tbody>

So now 3 out of the 4 rows for each item have an unrelated value (storeB stock) next to it in a column.

So my question is, what are you trying to do here as your final outcome. If you can explain that, I would be happy to advise you on how to do it correctly.
 
Upvote 0

Forum statistics

Threads
1,216,038
Messages
6,128,450
Members
449,453
Latest member
jayeshw

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