Pivot Table Logic

  • Thread starter Thread starter trmptr64
  • Start date Start date
T

trmptr64

I am trying to figure out how to sort a pivot table by
putting criteria in for multiple columns but using "or"
logic instead of "and" logic. In other words, if the
criteria in any of the columns is true, then display the
corresponding record. Any ideas would be appreciated.
 
Can you type a small example of how your pivot table is set up, and how
you'd like to sort it?
 
Maybe it's the raw data that you're inspecting:

Add a helper column labeled "Display" and add a formula like:

=or(a3>17,b3="michigan",d3<date(2003,11,25))

So this will evaluate to True if a3>17, or if it's in Michigan or the date in d3
is before 11/25/2003.

Then use that "Display" field as a page field in your pivottable. And show only
the True's.

(That's my guess.)
 
Here's a small sample of the table

Plan

Name License # Expiration Date DOT Physical Expiration Dat

I can sort this report by plant location. It contains a listing of every employee along with about a dozen other columns of various data on each employee. These columns of data may be blank, indicating missing data, or some contain expiration dates that need to be periodically updated. I want to be able to display every employee that has any columns which meet my search criteria of missing data or an iminent expiration date.

I hope this clarifies a little
 
Follow Dave's to add a column to your table, and use a formula to return
rows with any blank cells or imminent expiry dates, e.g.:

=OR(COUNTA(A2:D2)<4,TODAY()-C2<=30,TODAY()-D2<=30)

Then, instead of a PivotTable, you could choose Data>Filter>AutoFilter,
and from the dropdown list in the helper column, choose TRUE.
 
Back
Top