Pivot table - Hide calc items when shows 0

77pgrg

New Member
Joined
Apr 25, 2009
Messages
2
Hi,

I'm using excel 2007.

I would like to know how to write a macro that would hide a calculate
item when there is "0" as the result of the calculation in th
datafields.

In fact the problem happens anytime I have a field in excel rowfield tha
is not displaying the empty values of the datafield, but when I add
calculated item, then the pivot shows 0 in the data where there was n
data. And I want to hide all these ones.

Thnks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi Folks,

I am facing same problem and i have been searching the solutions for long time. But yet to got a clue on this calculated Item issues.

Do some one could help us in this regard. would be great help for us...

Cheers,
Chantty...
 
Upvote 0
I may be having a dense morning, but to me this doesn't actually tell me how to hide zeroes, just how to show them or how to hide blanks. I am misreading?

Ta,

lulu
 
Last edited:
Upvote 0
Hi, Lulu

I wonder if this approach is suitable? Instead of using the pivot table calculated field, create the field via SQL. I have posted a number of examples in the past [so you could try searching for my old posts on the subject], though it is likely just as easy to post some specific information of your example.

The basic idea is to create the pivot table and via SQL do the calculation. Such as below. Anyway, if you want specific help, please post some specific information on the fields. If creating manually, start from a file separate from the data and at the first step of the pivot table wizard take the external data option.

regards, Fazza

Code:
SELECT some fields, quantity * rate AS [new field]
FROM your_data
 
Upvote 0
Hi Fazza,

Thanks for your reply - I have spotted some of your other posts and will attempt to do follow them - never worked in sql before so was trying to avoid it but it looks like I will have to brave and try it.

Cheers,

Lulu
 
Upvote 0
Ok, Lulu. I just googled and found many old posts. Some are below. You might need to read a few. Or some others, via Google,
"site:mrexcel.com Fazza SQL calculated field pivot table"

http://www.mrexcel.com/forum/showthread.php?p=1622672
<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=64 border=0 x:str><COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 48pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=64 height=17></TD></TR></TBODY></TABLE>
<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=1695075</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=1749494</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=1904058</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=1906533</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=2001459</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=2015614</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=2038144</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=2120437</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 338pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=450 border=0 x:str><COLGROUP><COL style="WIDTH: 338pt; mso-width-source: userset; mso-width-alt: 16457" width=450><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD class=xl24 style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; WIDTH: 338pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=450 height=17>http://www.mrexcel.com/forum/showthread.php?p=2221359</TD></TR></TBODY></TABLE>

In fact SQL can be simple. It just takes a short time to learn the basics. Please post again as required. regards, F
 
Upvote 0

Forum statistics

Threads
1,214,976
Messages
6,122,539
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top