Data & Fields
For this visualization, in addition to the “Category” field, I use the “Sales” or “Profit” field.
The calculated field logic uses a parameter, so I create the parameter first.
Sales or Profit.calc
The Columns shelf has the new calc field, “Sales or Profit.calc”.
The “Category” field is on Rows shelf.
Parameter & Parameter control
This example has a parameter, “Sales or Profit.p.” Users can click the parameter control to switch between measure fields.
Sales or Profit.p
Marks Card: Color Tile
The values in my data set include negative and positive numbers for the “Profit” field, so I use a diverging color palette with 2 Steps for the Stepped Color.
Create the Viz
1. After connecting to a data source, click the drop-down arrow at the top of the Data pane to create a parameter.