Pergunta

I want to show a value in a cell of Excel which is coming from PowerPivot Field List.

How to show its value in Cell?

Foi útil?

Solução

You have a couple of options to show a value from a Power Pivot model in a cell in Excel.

1) Create a pivot table with only the values for the field that you want. You can do this by opening your Power Pivot model and clicking Pivot Table on the home tab. Locate the field you want and put it in the Rows. You can remove the grand total by going to the design tab in the PivotTable Tools group and choosing Grand Totals -> Off for Rows and Columns. You can type your own heading in the row that says row labels.

2) Use a slicer. Add a pivot table, then click Slicer on the Insert tab. Select the field you want to show and click OK. You can delete the rest of the pivot table if you don't need it.

3) Use cube functions. You can get a list of values for a certain dimension by creating a set and then cuberanked members. For example, I have a Power Pivot model with a field called cities. My cube set is in cell G1.

=CUBESET("ThisWorkbookDataModel","[Location].[City].[All].children", "Cities")

In the cells in column G below G1, I can copy the following cuberankedmember formula.

=IFERROR(CUBERANKEDMEMBER("ThisWorkbookDataModel",$G$1,ROW()-1),"")

This gets the list of members from the set in cell G1 and lists out the member in order. so you need to copy that to as many cells as there are values. I used ROW()-1 to create an autonumbered list that starts with 1. So in cell G4, I'm saying "get me the 3rd city. Since the number of members can change, I added the IFERROR. Normally, if you ask it for more members than are present, it will return #N/A. IfError catches that error and returns a blank string instead (this is purely for cosmetic purposes and can be left out).

You can see the results of the 3 options below.

enter image description here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top