![]() |
|
|
|
By: Dattatrey Sindol | Read Comments (2) | Related Tips: More > Microsoft Excel Integration |
I want to know if it is possible to show or hide columns in PowerPivot Tables and if it is possible to apply custom sorting on columns like sorting data in ColumnA based on data in ColumnB similar to SSAS functionality. Also, I would like to know, what are the other common properties which can be set at the column level.
In this tip we will take a look at the following properties of columns in a table in PowerPivot for Excel:
To start working with column properties using the steps in this tip, you need to first go through the following tips in the same sequence and setup your Excel/PowerPivot workbook using the steps outlined in these tips.
By default, the name of the column acts/shows up as its description in front-end/reporting tools like Excel. Description is a very useful feature and can be used to provide additional information about a column to the end users, while they are working with the data in tools like Excel.
Follow the below listed steps to set a description for any of the columns in a table. For this demonstration, we will set the description for "FullDateAlternateKey" column in "DimDate" table.
This is the description which the end users will see in column tooltips while analyzing/working with this data in tools like Excel.
When the data is pulled from the underlying data source into PowerPivot, the data type of columns is automatically detected and applied to the columns by PowerPivot. In the below screenshot, we can see that the data type of the "FullDateAlternateKey" column in "DimDate" table is set to "Date". Since the data present in this column is of date data type, we can leave it as is.
If we want to change the data type of any of the columns in PowerPivot, the following list of data types are supported:
One should be careful while changing the data type of a column, as it might lead to loss of precision or data in certain scenarios. In many scenarios, you might just want to change the data format (like Date only instead of Date Time as discussed in the next section).
Data in columns can be formatted by applying specific formatting styles and is very important from a reporting standpoint. Let's see how formatting can be applied to columns.
Do the same thing for "TaxAmt" and "Freight" columns as shown above.
Columns of a table can be either visible or hidden from the client tools. This is useful especially for reporting users, as some of the columns may not be required for analysis. For instance, an English User analyzing the data, would not require the Spanish Name of the product. Similarly some of the columns which are not required for analysis can be hidden from the client tools.
Hiding columns can be done in two different ways/views: in Diagram View and in Grid View
To demonstrate this, let's hide the "SpanishCountryRegionName" in "DimGeography" table. To hide a column from Client Tools, follow the below listed steps.
To demonstrate this, let's hide the "FrenchCountryRegionName" in "DimGeography" table. To hide a column from Client Tools, follow the below listed steps.
Always hide those columns from the Client Tools which are not required during analysis. This will greatly help the reporting users and will reduce confusion.
By default the columns are sorted based on the data type of the columns and the same sorting order is used to display the data in the reports (Pivot Charts/Tables). Data in the tables can be sorted based on specific columns in “Ascending” or “Descending” order based on the Data Type of the data present in the column. However, in some scenarios, we might want to a sort a column based on another column such as the end users wish to see the Month as “January”, “February”, etc... but they want to sort based on the Month Number and not Alphabetically. This is when custom sorting comes into the picture. Let's see how the data in one column can be sorted based on the data present in another column.
To demonstrate this, let's sort the Month Names in DimDate dimension based on Month Number. Add a new column as "SortedMonth" (This is to ensure we have both the original column and the sorted column) using the following steps:
As we can see, from the above demonstrations, there are various properties associated with columns in PowerPivot for Excel.
| Thursday, April 04, 2013 - 9:14:40 AM - Murali Mohan | Read The Tip |
|
Hi, Nice article, is there any way so that I can get the consolidated data from powerpivot back to excel.
I mean, I need to apply some conditional format to the columns which I can do it in powerpivot and need to import it as a table not a pivot table.
any clue here........ |
|
| Thursday, April 04, 2013 - 12:43:22 PM - Dattatrey Sindol (Datta) | Read The Tip |
|
Hi Murali,
One option is to copy paste the contents from PowerPivot window to Excel sheet, though it may not fully meet your requirement. As per my understanding, there is no other option to export PowerPivot data to Excel.
Best Regards, Dattatrey Sindol (Datta) |
|
|
privacy | disclaimer | copyright | advertise | about authors | contribute | feedback | giveaways | user groups Some names and products listed are the registered trademarks of their respective owners. Edgewood Solutions LLC | MSSharePointTips.com | MSSQLTips.com |