How can I modify this pivot table to show the desired data?

Lopez, Ahiezer 236 Reputation points
2023-01-04T00:01:12.593+00:00

I am creating a pivot table where the row is the reason code, the column the month/year, and the values Distinct Count of Production Number. There are moments where a production number is found in reason code 4 and 22 or in 5 and 26. Regardless, how can I make the pivot table only count production numbers that are found in one of the 6 different reason code groups, ignore any more that are in other groups. Hope this makes sense.
![275780-image.png][1]
[1]: /api/attachments/275780-image.png?platform=QnA

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,956 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,979 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Emi Zhang-MSFT 25,546 Reputation points Microsoft Vendor
    2023-01-04T08:07:19.637+00:00

    Hi @Lopez, Ahiezer ,
    It's not very clearly about your requirement, what's the meaning of "production number is found in reason code 4 and 22 or in 5 and 26"? And what is the "code groups"?
    I suggest you check if the slicer feature can help you, it's the way to filter the data in PivotTable:
    https://support.microsoft.com/en-us/office/use-slicers-to-filter-data-249f966b-a9d5-4b0f-b31a-12651785d29d

    If the groups related to the data source table, you should provide the data source here. And you can also provide the result table here, so that I can get more accurate solutions to this problem. I’m glad to help and follow up your reply.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Herbert Seidenberg 1,191 Reputation points
    2023-01-08T19:55:37.877+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.