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
Introducing our Online Power BI Class:
Would you like to join me on a date with Power BI? In this comprehensive online class, learn all about Power BI so you can create beautiful, insightful & interactive reports. Join me and rest of the play mates for our first ever Power BI Play Date.Click here to know more and join us.
Leave a Reply
|How many formulas should you learn? [Weekend Poll]||CP056: So which formulas you should care to learn?|