Win/Loss sparklines are compact charts that show binary outcomes—such as success or failure—relative to a baseline (typically zero). Positive values are shown above the baseline (wins), and negative values appear below the baseline (losses). These sparklines provide a quick visual summary of performance, especially in scenarios with clear pass/fail or gain/loss criteria.
When to use win/loss sparklines
- Displaying binary outcomes: Show results with two possible states, such as win/loss, gain/loss, or success/failure.
- Tracking positive and negative patterns: Visualize sequences of outcomes over time or across categories to reveal trends.
- Comparing results to a baseline: Highlight which values exceed or fall short of a target in a minimal, space-saving format.
Create a win/loss sparkline
- On the Insert tab, select Sparklines.
- Under Bar Sparkline, select Insert Win/Loss Sparkline. The Create Sparklines dialog opens.
- In Data Range, select a continuous range of cells (in the same row or column).
- In Location Range, select the cell where the sparkline will appear.
- Uncheck isFormulaSparkline if you do not want the sparkline to be saved as a formula. This removes the formula from the formula bar (
fx) and enables the Sparkline ribbon controls.
- Click Ok. The sparkline is inserted into the selected cell.
Edit a win/loss sparkline
- Select the win/loss sparkline in your workbook.
- On the Sparkline tab, select Settings. The CompatibleSparkline Setting dialog opens.
- Adjust the parameters, then click Ok.
- Copy and paste the sparkline cell to duplicate the configuration in another location, as needed.
When the isFormulaSparkline option is unchecked during creation, the sparkline is no longer controlled by a formula. The Settings button is replaced by direct ribbon controls.
- Select the win/loss sparkline in your workbook.
- Use the Sparkline tab to customize the sparkline:
- Change the sparkline type (Line, Column, or Win/Loss).
- Show or hide specific value points (first, last, high, low, negative).
- Apply custom marker and axis styles.
- Adjust sparkline and marker colors, and line thickness.
- To highlight values, enable the Markers option and select which points to display.
Win/loss sparkline parameters
The winloss sparkline formula supports the following format:
=WINLOSSSPARKLINE(data, dataOrientation, dateAxisData, dateAxisOrientation, setting)
Data parameters
| Parameter | Description |
|---|
| Data | Specifies the range containing sparkline data, such as A1:C3. |
| Data Orientation | Specifies the data orientation: Vertical or Horizontal. |
| DateAxisData | (Optional) Sets the date axis range, such as D1:F3. |
| DateAxisOrientation | (Optional) Specifies the sparkline date axis orientation: Vertical or Horizontal. |
| DisplayEmptyCellsAs | Specifies how to show empty cells: Gaps, Zero, or Connect. |
| Show data in hidden rows and columns | (Optional) Enables display of data in hidden cells. |
Show parameters
| Parameter | Description |
|---|
| Show First | Highlights the first data point using a different format. |
| Show Last | Highlights the last data point using a different format. |
| Show High | Applies distinct formatting to the highest value. |
| Show Low | Applies distinct formatting to the lowest value. |
| Show Negative | Formats negative values differently. |
| Show Markers | Display data markers for each sparkline. |
Group parameters
| Parameter | Description |
|---|
| MinAxisType | Defines the minimum axis type: Individual or Custom. |
| ManualMin | Becomes available when MinAxisType is set to Custom. Enter a value such as -3. |
| MaxAxisType | Defines the maximum axis type: Individual or Custom. |
| ManualMax | Becomes available when MaxAxisType is set to Custom. Enter a value such as 5. |
| RightToLeft | Displays the group direction from right to left, instead of the default left to right. |
| Display XAxis | Shows or hides the X-axis for the group in the visualization. |
Style parameters
| Parameter | Description |
|---|
| Style Setting | Defines the color or line weight for each visual element:
- Negative – Color of the negative data points for each sparkline in this sparkline group.
- Markers – Color of the data markers for each sparkline in this sparkline group.
- Axis – Color of the axis.
- Series – Color for each sparkline in this sparkline group.
- High Marker – Color of the highest data point for each sparkline in this sparkline group.
- Low – Color of the lowest data point for each sparkline in this sparkline group.
- First Marker – Color of the first data point for each sparkline in this sparkline group.
- Last Marker – Color of the last data point for each sparkline in this sparkline group.
- Line Weight – Thickness of the line.
|