Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Using OR condition to filter Pivot Table

  1. #1

    Using OR condition to filter Pivot Table



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I need the pivot table filtered results to be inclusive.

    So, I have a table with some data rows and 3 Columns A, B, C with possible values X, Y, Z... I specify a filter for columns A, B, C such as that I can retrieve the data rows that have A=Y OR B=Z OR C=X.

    The problem I have is that the default filters use an AND condition. So if I select the first value as A=Y, it will remove all other rows.

    Any ideas? I know that you can do something similar with an Advanced Filter, but I don't know if there's a simpler solution.

    Many thanks!

    Sent from my phone using Tapatalk

  2. #2
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,489
    Articles
    0
    Excel Version
    Excel 2016
    Can you possibly create another column that combines the 3 columns into 1, then you can filter for those conditions all within that column?


  3. #3
    Quote Originally Posted by NBVC View Post
    Can you possibly create another column that combines the 3 columns into 1, then you can filter for those conditions all within that column?
    Logically work but in reality not work.
    Because the value in column A,B,C are 'date' value. If combine, it will be meaningless.


    Sent from my phone using Tapatalk

  4. #4
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,489
    Articles
    0
    Excel Version
    Excel 2016
    You can put the variable in 3 separate cells,

    then add a formula like:

    =OR(A2=$X$2,B2=$Y$2,C2=$Z$2)

    where A2:C2 are your first 3 items in your data to check against the dates in X2:Z2. If any match a TRUE is returned. You can filter that column.


  5. #5
    attached a sample data. pls advise if I want to select date1=2012-04-31 or date2=2012-04-31 or date3=2012-04-31.
    I want to have some feasibility to select any date from date1, date2 and date3
    Attached Files Attached Files

  6. #6
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,489
    Articles
    0
    Excel Version
    Excel 2016
    Why the Pivot Table for this? There is the same info in both.


  7. #7
    sorry, i don't know what u mean.
    the attached sample xls is a dummy data. It is help to explain my case.
    you can use it to demostrate your suggestion.
    Thanks.

  8. #8
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,489
    Articles
    0
    Excel Version
    Excel 2016
    See attached.
    Attached Files Attached Files


  9. #9
    thanks. is it possible by using Pivot Table?

  10. #10
    Super Moderator NBVC's Avatar
    Join Date
    May 2011
    Location
    Mississauga, Canada
    Posts
    1,489
    Articles
    0
    Excel Version
    Excel 2016
    See attached.
    Attached Files Attached Files


Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •