PIVOT TABLE 0 VALUES

GPRADO

New Member
Joined
Feb 11, 2005
Messages
13
Hello,

I created a pivot table. The data has 2 columns, wk and villa number. The pivot shows me the week number and the villa number for that particular week. Now, I have certain weeks that do not have any data. So my pivot skips (doesnt' show) that week. Is there a way for the pivot table to show me that week and show a blank or a 0 value if the week doesnt have a villa number?

thanks,
George
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
You can specify the "Show data items with no data" for the 'wk' field, but the PivotTable must be pre-conditioned with all of the possible values for the 'wk' field. Assuming that your weeks are in the range 1-52, create a list of these values using the 'wk' fieldname. Reference this dataset from your PivotTable, then redirect your PivotTable's data range back to your original set of data. Now, your PivotTable "knows" all of your 'wk' values.
 
Upvote 0

GPRADO

New Member
Joined
Feb 11, 2005
Messages
13
Mark,

Thanks for your response. I don't quite follow you on the reference part. Is there a way I can send you or post the file so you can show me?

thanks,
George
 
Upvote 0

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
It's best to keep our exchange on this forum so others my benefit. By "reference" I mean data range that is specified at Step 2 of 3 in the PivotTable wizard.

Did I guess your 'wk' values correctly?
 
Upvote 0

GPRADO

New Member
Joined
Feb 11, 2005
Messages
13
ADVERTISEMENT
yes you did.. Ok I do have the range for the weeks selected. Also have on that range 3 resorts. Not all of the resorts have a villa assigned to a week. Could this be the problem?
 
Upvote 0

Mark W.

MrExcel MVP
Joined
Feb 10, 2002
Messages
11,654
Yes, temporarily create a separate, single column range whose 1st cell contains the label, 'wk', and the remaining 52 cells contain the values 1 thru 52. Have your PivotTable reference this range (Step 1 of 3 in the PivotTable wizard). After you've produced a PivotTable using this range, change your PivotTable's data range back to the original range, and re-create your desired PivotTable layout. Because you've used the same fieldname, 'wk', your PivotTable will "remember" that 'wk' consists of the values 1 thru 52. Using your original range, and with the "Show items with no data" field option checked your PivotTable will produce row/column entries for all known values for the 'wk' field.
 
Upvote 0

GPRADO

New Member
Joined
Feb 11, 2005
Messages
13
ADVERTISEMENT
I tried what you suggested. I can't seem to get it to work.
 
Upvote 0

Forum statistics

Threads
1,195,628
Messages
6,010,772
Members
441,568
Latest member
abbyabby

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
Top