• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Pivot Table Field and Slicers disappearing

BarraPippo

New Member
Hello community

I have a Sheet, named "Shipment Table" that contains a table where i input details of my incoming shipments (ID, origin, destination, departure date, arrival etc)

This table populate a Pivot Table in another sheet, named "Shipment Report" which i would like to filter using slicers (by status, by arrival date (year and month)

I also create a VBA Macro that allows me to create new shipments from the "Shipment Report" sheet.
This macro will create an ad hoc sheet where i input all the details and then will populate the "Shipment Table" table and so on, the pivot table in the "shipment report" sheet.

Problem is: when i create the new shipment using the macro and update the tables, for some reasons, the slicers i created for the pivot table disappears.
This happens only if i don't input an arrival date on the shipment page.

I leave a test copy for whoever would like to budge in the discussion

What am i doing wrong?
 

Attachments

  • Book1 - Copy.xlsm
    191.4 KB · Views: 3
Hello

Based on your description, it seems like the issue might be related to how the slicers are updating when new data is added to the "Shipment Table" and the pivot table is refreshed....Am currently workingbon code separately...will share shortly
 
The issue is that your two slicers are using date groupings on the ETA field. If you don't input a date, the field is no longer a date field and can't be grouped, so they disappear. You already have a month column in the table and you can add a year column , then use those two for the slicers. Also, if your users are all using English, you can simplify your column that calculates the month abbreviation to just:
=TEXT([@ETA],"mmm")
If you have to deal with international issues too, then you can still shorten it using CHOOSE:

=IFERROR(CHOOSE([@Column3],"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"),"")
 
Back
Top