Συγκεντρωτικός πίνακας: Συγκεντρωτικός πίνακας τις τελευταίες 4 εβδομάδες -

Για να δημιουργήσετε έναν συγκεντρωτικό πίνακα που εμφανίζει τα δεδομένα των τελευταίων 4 εβδομάδων (δηλαδή κυλιόμενες 4 εβδομάδες), μπορείτε να προσθέσετε μια στήλη βοηθού στα δεδομένα προέλευσης για να επισημάνετε τις εγγραφές τις τελευταίες 4 εβδομάδες και, στη συνέχεια, χρησιμοποιήστε τη στήλη βοηθού για να φιλτράρετε τα δεδομένα στο τον συγκεντρωτικό πίνακα. Στο παράδειγμα που εμφανίζεται, η τρέχουσα ημερομηνία είναι 25 Αυγούστου 2019 και ο συγκεντρωτικός πίνακας δείχνει 4 πλήρη προηγούμενα. Όταν προστίθενται νέα δεδομένα με την πάροδο του χρόνου, ο συγκεντρωτικός πίνακας θα συνεχίσει να παρακολουθεί τις προηγούμενες 4 εβδομάδες με βάση την τρέχουσα ημερομηνία.

Πεδία

Στον συγκεντρωτικό πίνακα που εμφανίζεται, υπάρχουν τέσσερα πεδία στα δεδομένα προέλευσης: Ημερομηνία, Πωλήσεις, Εβδομάδα και Φίλτρο. Το φίλτρο είναι μια βοηθητική στήλη με τύπο που επισημαίνει τις τελευταίες 4 εβδομάδες. Η εβδομάδα είναι μια στήλη βοηθού που επιστρέφει τη Δευτέρα για οποιαδήποτε δεδομένη ημερομηνία (μόνο για ευκολία). Οι πωλήσεις είναι το πεδίο αξίας και η Εβδομάδα προστέθηκε ως πεδίο Σειράς στην ομαδοποίηση ανά εβδομάδα:

Τύπος

Ο τύπος που χρησιμοποιείται στο D5 (Εβδομάδα), αντιγράφηκε, είναι:

=B5-WEEKDAY(B5,3)

Αυτός ο τύπος επιστρέφει τη Δευτέρα της εβδομάδας για οποιαδήποτε δεδομένη ημερομηνία.

Ο τύπος που χρησιμοποιείται στο E5 (Φίλτρο), αντιγράφεται, είναι:

=AND(B5>=TODAY()-WEEKDAY(TODAY(),3)-28,B5

This formula checks for dates in the last n weeks. It returns TRUE when a date is in the last 4 complete weeks, and FALSE if not. See the link for a full explanation.

Customizing week count

To customize the weeks displayed, adjust the Filter formula as needed to increase or decrease days. For example, to display the last 6 weeks (42 days), use:


=AND(B5>=TODAY()-WEEKDAY(TODAY(),3)-42,B5

Steps

  1. Add helper column for Week with the formula above
  2. Add helper column for Filter with the formula above
  3. Create a pivot table
  4. Add Sales as a Value field
  5. Add Week as a Row field
  6. Set number formatting for Week as desired
  7. Add helper column as a Filter, filter on TRUE

Related pivots

Pivot table last 7 days To create a pivot table that shows the last 7 days of data (or, more generally, the last n days) you can add a helper column to the source data with a formula to flag records in the last 7 days, then use the helper column to filter the data in the… Pivot table filter by weekday To create a pivot table with a filter for day of week (i.e. filter on Mondays, Tuesdays, Wednesdays, etc.) you can add a helper column to the source data with a formula to add the weekday name, then use the helper column to filter the data in the… Pivot table last 12 months To create a pivot table that shows the last 12 months of data (i.e. a rolling 12 months), you can add a helper column to the source data with a formula to flag records in the last 12 months, then use the helper column to filter the data in the pivot…

Pivot Table Training

If you use Excel, but don't know how to use Pivot Tables, you're missing out… wasting time trying to do things that a Pivot Table can do for you automatically. Core Pivot is a step-by-step Excel video course that will teach you everything you need to know to use this powerful tool. With a small investment, Pivot Tables will pay you back again and again. See details here.

ενδιαφέροντα άρθρα...