Excel Data Analysis 简明教程

Exploring Data with Power View Multiples

倍数,也称为格子图,是一系列具有相同 X 和 Y 轴的图表。可以将倍数并排放置,以便轻松比较许多不同的值。

Multiples, also called Trellis Charts are a series of charts with identical X and Y axes. You can arrange Multiples side by side, to compare many different values easily at the same time.

  1. You can have Line charts, Pie charts, Bar charts and Column charts as Multiples.

  2. You can arrange the Multiples horizontally or vertically.

Line Charts as Multiples

你可能希望按各个区域每年显示奖牌数。首先,需要有年字段。为了获得此字段,需要有如下所示的计算列:

You might want to display the medal count by year for each Region. Firstly, you need to have the field Year. To get this field, you need to have a calculated column as follows −

  1. Click the Medals tab in the Data View of the Data Model (in the PowerPivot window).

  2. Click in the first cell in the right most column with the header Add Column.

  3. Type =YEAR ([Edition]) in the formula bar and press Enter.

line charts as multiples

使用对应于 Edition 列中 Year 值的值创建一个带有标题 CalculatedColumn1 的新列。

A new column with header CalculatedColumn1 is created with values corresponding to the Year values in Edition column.

calculatedcolumn1 created

单击标题并将其重命名为 Year。

Click on the header and rename it as Year.

rename year
  1. Close the PowerPivot window. The Data Model gets updated. The new field - ∑ Year appears in the Power View Fields list.

  2. Create a Table in Power View with fields NOC_CountryRegion, Count of Year and Medal Count, by dragging the fields.

create table in power view
  1. Convert Table into a Line chart in Power View.

  2. Remove the field NOC_CountryRegion. A Line chart appears with Medal Count by Year.

remove field

正如你所观察到的,Year 在 POWER VIEW 字段列表中的 AXIS 区域中,而奖牌数在 ∑ VALUES 区域中。在折线图中,Year 值在 X 轴上,奖牌数在 Y 轴上。

As you can observe, Year is in AXIS area and Medal Count is in ∑ VALUES area in Power View Fields list. In the Line chart, Year values are on X-axis and Medal count on Y-axis.

现在,可以创建带有折线图的倍数可视化,如下所示:

Now, you can create Multiples visualization with Line charts, as follows −

  1. Drag the field NOC_CountryRegion to VERTICAL MULTIPLES area in the Power View Fields list.

  2. Click the tab LAYOUT on the Ribbon.

  3. Click Grid Height in the Multiples group.

  4. Click a value in the dropdown list.

create multiples visualization
  1. Click Grid Width in the Multiples group.

  2. Click on a value from the dropdown list.

您将得到一个倍数可视化,其中折线图被安排为一个网格,每条折线图代表一个国家(NOC_CountryRegion)。

You will get the Multiples Visualization with Line charts arranged as a grid, with each Line chart representing a country (NOC_CountryRegion).

arrange multiple visualization as grid

Vertical Multiples

您知道,您已经将“NOC_CountryRegion”字段放在“垂直倍数”区域中。因此,您已经得到的可视化是垂直倍数可视化。您可以在上面的图表中观察到以下内容。

As you are aware, you have placed the NOC_CountryRegion field in the VERTICAL MULTIPLES area. Hence, the visualization that you have got is the Vertical Multiples visualization. You can observe the following in the chart given above.

  1. One Line chart per category that is placed in VERTICAL MULTIPLES area, in this case – the country.

  2. The grid height and grid width that you have chosen determine the number of rows and number of columns for the Multiples.

  3. A common x-axis for all the multiples.

  4. A similar y-axis for each row of the multiples.

  5. A vertical scroll bar on the right side that can be used to drag the rows of Line charts up and down, so as to make the other Line charts visible.

Horizontal Multiples

您还可以如下获得水平倍数的倍数可视化 -

You can have the Multiples Visualization with Horizontal Multiples also as follows −

  1. Drag the field NOC_CountryRegion to VERTICAL MULTIPLES area.

  2. Click the Layout tab on the Ribbon.

  3. Select the values for Grid Height and Grid Width in the Multiples group.

您将得到如下所示的水平倍数可视化 -

You will get the Horizontal Multiples visualization as follows −

horizontal multiples

您可以在上面的图表中观察到以下内容 -

You can observe the following in the above chart −

  1. One Line chart per category that is placed in HORIZONTAL MULTIPLES area, in this case – the country.

  2. The grid height that you have chosen determines the height of the Line charts, unlike the number of rows of Line charts as is the case in the VERTICAL MULTIPLES. In other words, there is a single row of Line charts with the height determined by the Grid Height that is chosen.

  3. The grid width that you have chosen determines the number of columns of Line charts in the row.

  4. A common x-axis for all the multiples.

  5. A common y-axis for all the multiples.

  6. A horizontal scroll bar at the bottom, below the x-axis, that can be used to drag the row of Line charts to the left and the right, so as to make the other Line charts visible.

Pie Charts as Multiples

如果你想在倍数中探索/可视化多个类别,饼图是一种选择。假设你想探索每个国家的奖牌类型获得的奖牌数。按以下步骤操作:

If you want to explore / visualize more than one category in Multiples, Pie charts is an option. Suppose you want to explore the medal count by medal type for each of the countries. Proceed as follows −

  1. Click the Design tab.

  2. Select Pie from the dropdown under Other Chart.

  3. Drag Medal to the area SLICES.

你会得到带有饼图的水平倍数可视化,因为你在 HORIZONTAL MULTIPLES 区域有 NOC_CountryRegion 字段。

You will get the Horizontal Multiples visualization with Pie charts, as you have the field NOC_CountryRegion in the area HORIZONTAL MULTIPLES.

pie charts as multiples

正如你观察到的,每个国家/地区的奖牌数都以饼状图的形式显示,饼状图的切片代表了奖牌类型,颜色如图例所示。

As you can observe the medal-count for each country is displayed as a Pie chart with the slices representing the medal types with the color as given in the Legend.

假设你想突出显示所有国家的金牌数。你可以按以下步骤一次性完成:

Suppose you want to highlight the count of gold medals for all the countries. You can do it in a single step as follows −

单击其中一个饼图的蓝色切片(根据图例,蓝色代表金牌)。在所有饼图中,只有蓝色切片高亮显示,其他切片显示为灰色。

Click on the blue color slice one of the Pie charts (as blue is color for Gold as per the Legend). In all the Pie charts, only the blue slices are highlighted and other slices are grayed.

click blue color slice

正如你观察到的,这提供了一种快速探索和比较各国金牌数的方法。

As you can observe, this gives a fast way of exploring and comparing the count of gold medals across the countries.

你可能希望在可视化中显示更多数量的饼图。你可以通过简单地切换到垂直倍数可视化并为网格高度和网格宽度选择正确的值来实现此目的,以获得正确的显示效果。

You might want to display more number of Pie charts in a visualization. You can do it by simply switching over to Vertical Multiples Visualization and choosing the right values for Grid Height and Grid Width for a proper display.

gold medals across country

单击其中一个饼图上的蓝色切片。所有饼图中的蓝色切片都高亮显示,以便你比较各国金牌数。

Click on the blue slice on one of the Pie charts. The blue slices in all the Pie charts are highlighted so that you can compare the gold medal counts across the countries.

highlight blue color slice

Bar Charts as Multiples

你也可以为倍数可视化选择条形图。

You can choose Bar charts also for Multiples visualization.

  1. Switch over to Stacked Bar visualization.

  2. Adjust the Grid Height and Grid Width to get a proper display of the Bar charts.

使用网格高度为 6 和网格宽度为 2,你将获得:

With Grid Height of 6 and Grid Width of 2, you will get the following −

bar charts as multiples

你也可以为此可视化选择聚类条形图。

You can have Clustered Bar charts also for this visualization.

clustered bar

Column Charts as Multiples

你也可以为倍数可视化选择柱状图。

You can choose Column charts also for Multiples visualization.

  1. Switch over to Stacked Column visualization.

  2. Adjust the Grid Height and Grid Width to get a proper display of the Column charts.

当网格高度为 2、网格宽度为 6 时,您将获得以下结果:

With Grid Height of 2 and Grid Width of 6, you will get the following −

column charts as multiples

对于此可视化,您也可以选择簇状柱形图。

You can have Clustered Column charts also for this visualization.

clustered column charts

Wrap-up

您选择字段取决于您想要探索、分析和展现的内容。例如,在上述所有可视化中,我们对代表按奖牌类型分析奖牌数量的切片的奖牌选择了“切片”,您可能希望按性别来探索、分析和展现数据。在这种情况下,选择性别字段作为“切片”。

The fields you choose depend on what you want to explore, analyze and present. For example, in all the visualizations above, we have chosen Medal for Slices that helped to analyze medal count by medal type. You might want to explore, analyze and present the data gender-wise. In such a case, choose the field Gender for Slices.

同样,合适的可视化还取决于您要显示的数据。如果您不确定适用性如何,您可以自行尝试选择合适的可视化,因为在 Power View 中快速而简单地切换可视化。此外,您还可以在演示视图中执行此操作,以便在演示过程中回答任何可能出现的问题。

Once again, the visualization that is suitable also depends on the data you are displaying. If you are not sure about the suitability, you can just play around to choose the right one as switching across the visualizations is quick and simple in Power View. Moreover, you can also do it in the presentation view, in order to answer any queries that can arise during a presentation.