Bottom Line: Learn five issues and workarounds for the new PIVOTBY function recently introduced by Microsoft.
Skill Level: Intermediate
Video Tutorialhttps://youtu.be/AFrzpEfdWlAWatch on YouTube & Subscribe to our ChannelDownload the Excel FileYou can access the Excel file used in the video for free by clicking below.
5 Problems with PIVOTBY.xlsxDownload Excel's New PIVOTBY FunctionMicrosoft recently introduced two new functions for Excel: GROUPBY and PIVOTBY. These functions allow users to create summary reports using formulas. While these new features offer exciting possibilities, they come with their own set of challenges. In this blog post, we'll look into five problems with Excel's new PIVOTBY function and explore potential workarounds.
First, let's take a quick look at how they work.
GROUPBYThe GROUPBY function allows you to create a summary of the data you choose to see. In the example below, I've chosen to sum the quantities from rows that have the same color.
PIVOTBYPIVOTBY is similar, but it adds an additional option for column fields. In this example, I've added Years as my column fields, so that the quantities by color are broken out into the various years they were sold.
These two new functions are awesome, especially because any changes you make to the data are immediately reflected in the tables. With Pivot Tables, you must refresh the table whenever you make data changes. If you are not familiar with Pivot Tables, you can start learning about them with this tutorial: How Do Pivot Tables Work?
Although the automatic refresh is a pretty sweet benefit of GROUPBY and PIVOTBY, these functions present some problems when compared to Pivot Tables, in my opinion. Here are 5 of those problems and their workarounds.
WorkaroundConditional formatting can be used to dynamically format PIVOTBY reports. By setting conditional formatting rules based on specific criteria, such as the presence of Total rows, we can ensure consistent formatting even as data changes.
If you don't have much experience with conditional formatting, check out this tutorial on How to Apply Conditional Formatting to Rows Based on Cell Value.
WorkaroundA workaround involves creating a PIVOTBY Builder tool, which offers a more user-friendly interface for selecting row and column fields. While it may not replicate the drag-and-drop functionality of Pivot Tables, it provides a more structured approach to modifying PIVOTBY reports.
Since the formulas for this Builder can get pretty complicated, I recommend copying it from the Excel file included at the top of this tutorial rather than building it yourself.
Click to enlargeWorkaroundOne workaround is to use a Dynamic Grid Slicer, which leverages checkboxes and formulas to mimic slicer functionality in PIVOTBY reports. While not as seamless as built-in slicers, Dynamic Grid Slicers offer a formula-based alternative for filtering data.
Here's a tutorial that explains the Dynamic Grid Slicer in more detail: New Excel Slicer for PIVOTBY.
You can see the difference by comparing the two images below (PIVOTBY shown on top and Pivot Table on bottom).
Workaround Conditional formatting can once again come to the rescue by applying formatting rules to subtotal columns, making them visually distinct from other data. By setting conditional formatting based on specific criteria, such as the presence of a blank cell in the subtotal columns, we can add the word “Total” to the subtotal and fill those columns with gray color to mimic what we are accustomed to seeing with Pivot Tables.
Here's what our PIVOTBY table looks like with the conditional formatting.
WorkaroundTo calculate percent of row totals in PIVOTBY, we can switch the row and column fields and then apply the percent of column total calculation. By manipulating the report structure and then using the TRANSPOSE function, we can achieve similar results to traditional pivot tables.
ConclusionIn conclusion, while Excel's new PIVOTBY function introduces exciting capabilities for creating formula-based reports, it also comes with its share of limitations. From formatting challenges to flexibility issues, users may find themselves grappling with various aspects of PIVOTBY compared to traditional Pivot Tables.
However, with creative workarounds, we can mitigate these challenges and leverage PIVOTBY more effectively.
Do you see yourself using PIVOTBY and GROUPBY in place of Pivot Tables? Leave a comment and let us know.
Link to post: 5 Problems with Excel’s New PIVOTBY Function