#1   Report Post  
suhair
 
Posts: n/a
Default filter & pivot table

Hi,
Can i get help!!
I have a pivot table, and in the data i have a sum of
quantity of items, i dont want to see items that there
sum is zero, (the zero is because of number of records
that there sum is zero!!!).
Can u help me to hide these items?
Thank you,
Suhair
  #2   Report Post  
CarlosAntenna
 
Posts: n/a
Default

In your pivot table, right click on the field name, choose field options,
clear the check box for "Show items with no data".

Carlos

"suhair" wrote in message
...
Hi,
Can i get help!!
I have a pivot table, and in the data i have a sum of
quantity of items, i dont want to see items that there
sum is zero, (the zero is because of number of records
that there sum is zero!!!).
Can u help me to hide these items?
Thank you,
Suhair



  #3   Report Post  
 
Posts: n/a
Default

Hi Carlos,
This option is sutable for items that has no sum, and
dont work if you have more than record that there sum is
zero!!!!!
Do you have anther idea??
Suhair

-----Original Message-----
In your pivot table, right click on the field name,

choose field options,
clear the check box for "Show items with no data".

Carlos

"suhair" wrote in

message
...
Hi,
Can i get help!!
I have a pivot table, and in the data i have a sum of
quantity of items, i dont want to see items that there
sum is zero, (the zero is because of number of records
that there sum is zero!!!).
Can u help me to hide these items?
Thank you,
Suhair



.

  #4   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You could use a macro to hide the rows. For example:

'=============================
Sub HidePivotZeroRows()
'hide worksheet rows that contain all zeros
Dim rng As Range
For Each rng In ActiveSheet _
.PivotTables(1).DataBodyRange.Rows
If Application.Sum(rng) = 0 Then
rng.EntireRow.Hidden = True
Else
'unhide any previously hidden rows
rng.EntireRow.Hidden = False
End If
Next rng
End Sub
'=================================

Or for Excel 2002 or later:

'==========================
Sub HideZeroRowTotals()
'hide rows that contain zero totals
'by Debra Dalgleish
Dim r As Integer
Dim rTop As Integer
Dim i As Integer
Dim pt As PivotTable
Dim pf As PivotField
Dim df As PivotField
Dim pi As PivotItem
Dim pd As Range
Dim str As String
Set pt = Sheets("Pivot").PivotTables(1)
Set df = pt.PivotFields("Units") 'data field
Set pf = pt.PivotFields("Rep") 'column field
rTop = 4 'number of rows before data starts
For Each pi In pf.PivotItems
On Error Resume Next
pi.Visible = True
Next pi
i = pf.PivotItems.Count + rTop
For r = i To rTop - 1 Step -1
On Error Resume Next
str = Cells(r, 1).Value
Set pd = pt.GetPivotData(df.Value, pf.Value, str)
If pd.Value = 0 Then
pf.PivotItems(str).Visible = False
End If
Next r

End Sub
'===================================


suhair wrote:
Hi,
Can i get help!!
I have a pivot table, and in the data i have a sum of
quantity of items, i dont want to see items that there
sum is zero, (the zero is because of number of records
that there sum is zero!!!).
Can u help me to hide these items?
Thank you,
Suhair



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I show summary totals from a pivot table on a bar chart Colleen T Charts and Charting in Excel 5 January 22nd 05 01:41 AM
Jon Peltier - Pivot Table Result for yesterday's "Complex Chart" Question Barb Reinhardt Charts and Charting in Excel 3 December 8th 04 01:48 AM
create space in line chart between points, linked to pivot table Mike -Z- Charts and Charting in Excel 1 December 7th 04 09:39 PM
pivot table multi line chart souris Charts and Charting in Excel 2 December 7th 04 03:56 AM
convert excel list to pivot table GI Excel Discussion (Misc queries) 0 December 6th 04 06:45 PM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"