Before You Begin

This tutorial shows you how to design a visualization that provides a way for users to change columns in the visualization without changing the workbook.

Background

You can create a visualization with a measure on the X-Axis such as Sales that users can change to another measure such as Profit. On the Y-Axis, you can define the visualization with the Product Name attribute on the Y-Axis and enable column swapping so that users can select a different attribute. You can implement column swapping in visualizations that use an X-Axis, Y-Axis, and a legend. You add the columns for swapping to Related Columns in the Grammar pane. The X-Axis drop target can only contain measures and the Y-Axis drop target can only contain attributes.

What Do You Need?

Create a Dataset

In this section, you create a dataset to use for a visualization with column swapping enabled.

  1. Sign in to Oracle Analytics.
  2. On the Home page, click Create and click Dataset.
  3. In Create Dataset, click Drop data file here or click to browse. In File Upload, select sample_order_lines2023.xlsx and click Open.
  4. In Create Dataset Table from sample_order_lines2023.xlsx, click OK.


    Description of sample_order_lines2023_jd.png follows
    Description of the illustration sample_order_lines2023_jd.png
  5. In New Dataset, click Save. In Save Dataset As, enter sample_order_lines2023 and click OK.

Create a Workbook

In this section, you create a simple bar chart visualization.

  1. Click Create Workbook. Close the Insights panel.
  2. In the Data Data pane icon pane, hold down the Ctrl key, select Order Priority and Sales, and then drag the data elements to the canvas.


    Description of sales_by_order_priority.png follows
    Description of the illustration sales_by_order_priority.png

Add Columns for Swapping

In this section, you enable the column setting property for the visualization and add columns for swapping.

  1. Click Properties Properties icon. In Properties, click Advanced.
  2. In Advanced, click Off in Column Swap to enable On for column swapping.
  3. Click Grammar Grammar pane icon.
  4. In Data, hold down the Ctrl key, select Customer Segment, Product Sub Category, Product Category, Profit, and Quantity Ordered. Drag the data elements to Related Columns in the Grammar pane.


    Description of related_cols.png follows
    Description of the illustration related_cols.png
  5. Click Preview Preview icon.
  6. In Preview on the X-Axis, click Sales and select Profit.


    Description of profit_by_order_priority.png follows
    Description of the illustration profit_by_order_priority.png
  7. In Preview on the Y-Axis, click Order Priority and select Product Sub Category.
    Description of profit_by_prodsubcat.png follows
    Description of the illustration profit_by_prodsubcat.png

Learn More