Click here to Skip to main content
15,886,362 members
Articles / Productivity Apps and Services / Microsoft Office / Microsoft Excel
Tip/Trick

Excel 2013 Power Pivot Sorting

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
4 Apr 2013CPOL 17.7K   1  
How to do power pivot sorting in Excel 2013

Introduction

While creating a Power Pivot based report, i.e., Pivot table or Pivot chart, using Month slicer is a very common requirement. There are a number of blogs that show how to sort the Month in natural order in Pivot table. You can also find some workarounds to sort Month in natural order for slicer as well. One such tip is explained well in MSDN blog here.

But with Excel 2013, there is no need to have such workarounds.

Using the Code

Assuming you have Date table with the following columns:

  1. Year => 2010, 2011, 2012.......
  2. Month Name => Jan, Feb, March.....
  3. MonthOfYear => 1, 2, 3..... 12

Now select the column Month Name, under sort and filter section of Home tab.

Image 1

Now click on "Sort by Column.."

Image 2

In this, select the Column to be sorted and sorted by. Here, sort column is MonthName and By column is MonthOfYear. Click Ok.

Now you can add the Slicer of Month Name and it will be sorted by natural order instead on alphabet.

Image 3

Using this functionality, any column can be sorted by any other column within the table.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
India India
I work as a freelance consultant and is passionate about taking challenges in latest technology.
I am a solution architect and trainer with 9+ years experience in designing, developing and maintaining enterprise wide application using latest technology like SharePoint 2010, MOSS 2007, Business Intelligence, SQL Server 2008, Reporting Service, Analysis Service and Integration service.

Comments and Discussions

 
-- There are no messages in this forum --