Search code examples
pivot-tablepowerpivotexcel-2013

Display field in slicer in powerpivot


I have a slicer which has value 'A' and 'B'. can I change it in a way that, wherever it is 'A', should display 'Apple' and 'B' should display 'Banana' without doing any changes in my database tables.


Solution

  • For me this is one of the best things about PowerPivot - the ability to make fields more friendly in appearance without changing the underlying data.

    In the PowerPivot table add a calculated column to the relevant table e.g.

    =IF('Table'[Code]="A", "Apple", IF('Table'[Code]="B", "Banana"))

    You can give this column the name of your choice an use that in the slicer instead. You can further improve the presentation by hiding the original column from client tools via a right click on that column in the PowerPivot window.