Pergunta

I've got 2 Excel sheets with some data. Excel 1:

Url   | Milliseconds
url/1 | 0.6534
url/2 | 0.5422
url/3 | 4.2133

Excel 2:

Url   | Milliseconds
url/1 | 0.8531
url/2 | 0.3254
url/3 | 3.5124

I want to aggregate this date in 1 chart, so I figured I could go using the PowerChart offered by the PowerPivot functionality.

Using PowerPivot I've added the 2 Excel files as a datasource and managed to create a chart. I've also created a relationship between the Excel 1.Url field and the Excel 2.Url field.

Now when creating the chart, the Excel 1.Milliseconds field shows up correct. When I add the Excel 2.Milliseconds column to the chart (in the Values block), it shows the Sum of Milliseconds. This is possibly due to the fact the field value is set to be the Sum. But I can't change this to be the actual value of the field. Below is a screenshot of what I'm dealing with (dutch Excel 2013)

https://www.dropbox.com/s/wm4bwraz8b1uqxp/SOExcelPowerPivot.png

Am I missing something? That's quite possible as this is the first time I'm working with PowerPivot.

Foi útil?

Solução

Jan, the solution should be quite simple:

  • Create a separate table of URLs (I named it URL_list) and link your source tables (URL_1 and URL_2 in my diagram) to this table. You should get something like this:

enter image description here

  • Create new calculated fields (Excel 2013, in 2010 it's called Measure) for calculating the average load time:

Formula for table URL_1 (I called it Avg Time in MS_1, see my diagram):

=AVERAGE(URL_1[Millisecond])

Formula for table URL_2 (Avg Time in MS_2):

=AVERAGE(URL_2[Millisecond])
  • Once this is done, simply insert a new PowerPivot table and add PivotChart using Options ribbon. Drag URL from table URL_list onto Rows and then add the newly created calculated fields.

The result should look like this:

enter image description here

I have uploaded the Excel file to my Desktop public folder. Hope this helps!

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