Create Filter On Pivot Table

0
Evaluating the Excel product and I have a nice Pivot Table working; but I cannot seem to figure out how to add a filter to the table? Thanks, -Chuck
 
asked 7/19/2018 6:35:16 PM
add a comment

2 Answers

0
What I'm really looking for is more like this. Here's my pivot table created via code: ![Pivot Table via ComponentPro][1] What I'd like to do is have the "Store Num" field as a filter, similar to what the next image shows. Is this possible? -Thanks, -Chuck ![enter image description here][2] [1]: https://i.imgur.com/aGIOogj.png [2]: https://i.imgur.com/qPBitaX.png
 
answered 7/21/2018 6:23:22 PM
add a comment
0
After creating your PivotTable, you can use the following code to apply one or more filters: var field = pivotTable.Fields[2]; // Apply value filter field.PivotFilters.Add(PivotFilterType.ValueLessThan, field, "999", null);
edited 7/21/2018 2:21:44 AM
answered 7/21/2018 2:21:35 AM
  I clarified what I was trying to do in another comment. cbensinger 7/21/2018 6:37:56 PM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged excel or ask your own question.