layui字段拖拽_在不拖动的情况下移动枢轴字段

layui字段拖拽

Last week, someone asked me if there is a menu command for moving the fields in a pivot table layout. For example, if the Region field is in the Columns area, can you use a command to move it to the Rows area, or do you have to drag it with the mouse, in the PivotTable Field List?

上周,有人问我是否存在用于在数据透视表布局中移动字段的菜单命令。 例如,如果“区域”字段位于“列”区域中,您是否可以使用命令将其移至“行”区域,还是必须用鼠标将其拖动到“数据透视表字段列表”中?

layui字段拖拽_在不拖动的情况下移动枢轴字段_第1张图片

移动轴心 (Move a Pivot Field)

Usually, if I want to move a pivot field, after adding it to the layout, I use the mouse to drag it. It's quick and easy, and you can drag a field to a specific position within the existing fields in another area.

通常,如果要移动枢轴字段,请在将其添加到布局后使用鼠标拖动它。 快速简便,您可以将字段拖到另一个区域中现有字段内的特定位置。

For example, the Region field can be dragged from the Columns area to the Rows area, above the City field.

例如,可以将“区域”字段从“列”区域拖到“城市”字段上方的“行”区域。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第2张图片

功能区上的活动字段命令 (Active Field Commands on the Ribbon)

What if you don't want to drag? What other ways can you move a pivot field?

如果您不想拖动怎么办? 您还可以通过哪些其他方式移动枢轴字段?

If you select a cell in a pivot table, the PivotTable Tools tab appears, and you can click the Analyze tab (or Options in Excel 2010), to see the available commands for the Active Field.

如果在数据透视表中选择一个单元格,则将显示“数据透视表工具”选项卡,然后单击“分析”选项卡(或Excel 2010中的“选项”),以查看“活动字段”的可用命令。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第3张图片

There isn't too much in the Active Field group. You can:

活动字段组中没有太多内容。 您可以:

  • see the name of the active field

    查看活动字段的名称
  • expand or collapse the field

    扩大或缩小领域
  • drill up or down (Excel 2013)

    向上或向下钻取(Excel 2013)
  • open the Field Settings dialog box.

    打开“字段设置”对话框。

However, there isn't a command on the Ribbon that will let you move the active field.

但是,功能区上没有命令可让您移动活动字段。

移动字段而不拖动 (Move the Fields Without Dragging)

Although there aren't any commands on the Ribbon to do the job, there are commands on the field buttons, in the PivotTable Field List.

尽管功能区上没有任何命令可以执行此工作,但是在数据透视表字段列表中的字段按钮上有命令。

To see the PivotTable Field List, click any cell in the pivot table.

要查看数据透视表字段列表,请单击数据透视表中的任何单元格。

NOTE: If the list doesn't appear, click the Analyze tab on the Ribbon, then click Field List.

注意:如果列表没有出现,请单击功能区上的“分析”选项卡,然后单击“字段列表”。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第4张图片

In the Field List, click the arrow at the right side of a field button, then click one of the commands.

在“字段列表”中,单击字段按钮右侧的箭头,然后单击命令之一。

In the screen shot below, the Region field will move to the Rows area.

在下面的屏幕截图中,“区域”字段将移至“行”区域。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第5张图片

The Region field moves to the Row area, at the end of the existing fields.

“区域”字段将移动到现有字段末尾的“行”区域。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第6张图片

If you want a field to appear in a different position within a section, you can use the commands to move it up or down.

如果希望某个字段显示在节中的其他位置,则可以使用命令上下移动该字段。

In the screen shot below, the Region field will move to the top of the fields in the Rows area, after I click Move to Beginning.

在下面的屏幕截图中,单击“移至开头”后,“区域”字段将移至“行”区域中字段的顶部。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第7张图片

工作表上的命令 (Commands on the Worksheet)

You can also use commands that appear if you right-click a pivot table Row or Column cell on the worksheet, and click Move.

如果右键单击工作表上的数据透视表“行”或“列”单元格,然后单击“移动”,您还可以使用显示的命令。

In the screen shot below, I'm moving the Region to the right, so it appears after the City field. There are also commands to reposition the pivot item in the active cell – "East" in this example.

在下面的屏幕截图中,我将区域右移,因此它出现在“城市”字段之后。 也有用于在活动单元格中重新定位数据透视表项的命令-在此示例中为“ East”。

NOTE: With this menu, you can only move fields between the Row and Column areas -- not to the Values or Report Filter areas.

注意:使用此菜单,您只能在“行”和“列”区域之间移动字段,而不能移动到“值”或“报表过滤器”区域。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第8张图片

To use these commands with the keyboard,

要通过键盘使用这些命令,

  • Select a Row or Column cell in a pivot table

    在数据透视表中选择行或列单元格
  • Press the Menu key on the keyboard

    按键盘上的菜单键
  • Use the Up and Down arrow keys to move through the list.

    使用向上和向下箭头键在列表中移动。
  • Use the Right and Left arrow keys to open and close the submenus.

    使用左右箭头键打开和关闭子菜单。
  • Press Enter to select commands

    按Enter键选择命令

数据透视表字段列表中的键盘快捷键 (Keyboard Shortcuts in the PivotTable Field List)

If you like to keep your hands on the keyboard, you can use keys to access the menus for the field buttons in the PivotTable Field List.

如果您希望将手放在键盘上,则可以使用键访问数据透视表字段列表中字段按钮的菜单。

  • Press the F6 key as many times as necessary, to set the focus on the PivotTable Field List. It can be hard to tell what has focus, but something in the Field List will show as selected, when that pane has the focus.

    多次按F6键,将焦点设置在数据透视表字段列表上。 很难说出焦点所在,但是当该窗格具有焦点时,“字段列表”中的某些内容将显示为选中状态。

In the screen shot below, you can see a faint outline around the TotalPrice field in the top section of the Field List.

在下面的屏幕快照中,您可以在“字段列表”顶部的TotalPrice字段周围看到一个模糊的轮廓。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第9张图片
    • Tools (gear button at top right)

      工具(右上方的齿轮按钮)
    • Fields Section (top)

      字段部分(顶部)
    • More Tables

      更多桌子
    • Areas Section Field Buttons

      区域部分字段按钮
    • Defer Layout Update

      延迟布局更新
  • Use the Up and Down arrow keys to move within a section

    使用向上和向下箭头键在部分中移动

In the screen shot below, the Region field is selected, in the Rows area.

在下面的屏幕快照中,在“行”区域中选择了“区域”字段。

layui字段拖拽_在不拖动的情况下移动枢轴字段_第10张图片
  • To open a list, press the Down arrow key

    要打开列表,请按向下箭头键
  • Use the Up and Down arrow keys to move through the menu

    使用向上和向下箭头键在菜单中移动
  • Press Enter to select a command, or press Esc to exit the menu.

    按Enter选择命令,或按Esc退出菜单。

I'll stick with dragging and dropping though – it's much quicker for me!

不过,我会坚持拖放操作-对我来说,速度要快得多!

翻译自: https://contexturesblog.com/archives/2015/06/04/move-pivot-fields-without-dragging/

layui字段拖拽

你可能感兴趣的:(excel,java,数据分析,可视化,大数据)