Find first & last date of a sale using Pivot tables [quick tip]
Here is a quick Pivot table tip. Let’s say your work at ACME inc. requires some fancy pants analysis of product sales. Imagine looking at below data & trying to find out the earliest & latest date for each product sale.
Of course, we can concoct a version of MINIFS & MAXIFS to answer the question. But why bother, when you can answer the question with just a few clicks.
Pivot table to find first & last date of product sales
First create a pivot from the raw data, with products in row labels & date in the values area. We get this.
Now, add date again to values area. Yes, you can do this. You can add same field multiple times to values area.
- Right click on the first date values and choose Summarize Values By > Min.
- Right click on the second date values and choose Summarize Values By > Max.
- Adjust value field settings to format the dates values as dates
- Viola, your report is ready.
If you have sales data by other attributes (like store name, region or category), you can set up slicers to create the same report at different levels.
More pivot table tricks to up your game…
Pivot tables are incredibly fun to use and amazingly handy. Check out below tuts to get started.
- Generate combinations of two lists with pivot tables
- Introduction to GETPIVOTDATA, talk to pivots and get what you want
- Matching credits & debits using pivot tables
- Sample your data with pivots
- Monthly values & % changes in one AWESOME pivot report
My name is Chandoo. Thanks for dropping by. My mission is to make you awesome in Excel & your work. I live in Wellington, New Zealand. When I am not F9ing my formulas, I cycle, cook or play lego with my kids. Know more about me.
Thank you and see you around.
Leave a Reply
|« How many formulas should you learn? [Weekend Poll]||CP056: So which formulas you should care to learn? »|