Calculations outside table does not react on filter within table

DeThomaso

New Member
Joined
Nov 14, 2021
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi

Perhaps some of you will respond to this question to encourage me to use Pivot Table and I will eventually do that, but for the moment I need to see if there is another solution to this.

Here is the thing, I have a table with several rows which I can use filter to exclude data and only look at the data I need.
Outside the table I have a classic Bell Curve (x/y plot) of my data.
The Bell Curve is based on the data within the table.
But the data is measured over time and I want to see how the Bell Curve and other types of calculations differ using filter in table.

I use the formula "=STDEV.P(DataTable[Actual_value])" in one cell outside the table.
Were the table name is "DataTale" and the row "Actual_Value" is the data used for calculating.
I am using structured references with Excel tables and thought that this might do the trick.
But this does not adapt to the filter I am using in table.

I have tried searching for a solution to this without luck.
How can I expand the formula to only take the data that is filtered out?
One logic code if it would excist is:
"=STDEV.P(DataTable[#Filter[Actual_value]])"
or
"=STDEV.P(DataTable[Actual_value@Filter])"
or
"=STDEV.P(DataTable[Actual_value]by Filter)"

Is there anybody that can help me?

Thanks
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
If I understand correctly, the thing to do is use function SUBTOTAL with the appropriate argument for its base function, in your case std.dev like I did here in G7. I applied a slicer to the data to filter it. When I selected a few of the values in "target", the formula in G7 obeyed the filtering, while the one in G6 did not.

MrExcel posts19.xlsx
CDEFGHIJ
5
623.49159=STDEV.P(Table1[observation])
723.49159=SUBTOTAL(8,Table1[observation])
8targetobservation
966.8
107978
112827.5
121211.5
132727.8
146060.5
157575.2
165252.5
171213
183434.9
196262.4
206262.5
213738
Sheet7
Cell Formulas
RangeFormula
G6G6=STDEV.P(Table1[observation])
H6:H7H6=FORMULATEXT(G6)
G7G7=SUBTOTAL(8,Table1[observation])
 
Last edited:
Upvote 0
Solution
Hi again

A complementary quastion to the same subject.

This formula looks at a row in the table above and check if all values have PASS or FAIL:
"=AND((EXACT(AllData!O2:O337;"PASS")))"
How can I get this to follow the filter?

Thanks
 
Upvote 0
Sorry the original formula were:
"=AND((EXACT(DataTable[PASS_FAIL];"PASS")))"
This is the one I want to follow Filter in table.

I am fiddling with the formula to see if I can have go around this instead, but the AND function gets error:
"=FILTER(DataTable[PASS_FAIL];ISNUMBER(SEARCH("FAIL";DataTable[PASS_FAIL]));"FAIL")"
 
Upvote 0
I don't understand. Please put some sample data into the example I provided and post it. You can use the add-in xl2bb in my signature below.

Also, indicate what you are looking for and include the desired outcome.
 
Upvote 0
Here is an example of the code I want to use.
The formula on top is the one that is not doing what I like it to do.
If I filter on PASS_FAIL it will still do the formula on complete table.
I want it to adapt to the filter as the graphs does and what Subtotal does.
:)


1637869247351.png



Thanks
 
Upvote 0
MrExcel posts19.xlsx
CDEFGHIJKLMNOP
623.49159=STDEV.P(Table1[observation])42.35385all pass?No
723.49159=SUBTOTAL(8,Table1[observation])42.35385
8targetobservationp_fpf helper
966.8pass1
107978pass1
112827.5pass1
121211.5pass1
132727.8pass1
146060.5pass1
157575.2pass1
165252.5pass1
171213pass1
183434.9pass1
196262.4pass1
206262.5pass1
213738fail0
Sheet7
Cell Formulas
RangeFormula
G6G6=STDEV.P(Table1[observation])
H6:H7H6=FORMULATEXT(G6)
G7G7=SUBTOTAL(8,Table1[observation])
P6P6=IF(SUBTOTAL(9,Table1[pf helper])=SUBTOTAL(2,Table1[pf helper]),"Yes","No")
L6L6=SUBTOTAL(9,Table1[observation])/SUBTOTAL(2,Table1[observation])
L7L7=SUBTOTAL(1,Table1[observation])
F9:F21F9=--([@[p_f]]="pass")
 
Upvote 0
The formula in M6 obeys the filtering.

MrExcel posts19.xlsx
CDEFGHIJKLM
623.49159=STDEV.P(Table1[observation])all pass?No
723.49159=SUBTOTAL(8,Table1[observation])
8targetobservationp_fpf helper
966.8pass1
107978pass1
112827.5pass1
121211.5pass1
132727.8pass1
146060.5pass1
157575.2pass1
165252.5pass1
171213pass1
183434.9pass1
196262.4pass1
206262.5pass1
213738fail0
Sheet7
Cell Formulas
RangeFormula
G6G6=STDEV.P(Table1[observation])
H6:H7H6=FORMULATEXT(G6)
G7G7=SUBTOTAL(8,Table1[observation])
M6M6=IF(SUBTOTAL(9,Table1[pf helper])=SUBTOTAL(2,Table1[pf helper]),"Yes","No")
F9:F21F9=--([@[p_f]]="pass")
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,588
Members
449,039
Latest member
Arbind kumar

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