Column Subtotals

These IronPython scripts below show how to modify any of the Cross Table visualization settings found on the Column Subtotals tab of the Cross Table Properties dialog box in the Spotfire user interface.
Note

In each of the scripts below, it is assumed that the MyVis variable references the targeted visualization. See here for more information about referencing visualizations.

Show Subtotals for Specific Columns, Before or After Values

The IronPython script below shows how to change any of the options on the Column Subtotals tab of the cross table Properties dialog box.

from Spotfire.Dxp.Application.Visuals import *

myVis = myVis.As[Visualization]()

# Show all column subtotals
myVis.ColumnSubtotals.ShowAll()

# Show no column subtotals
myVis.ColumnSubtotals.HideAll()

#Show only specific column subtotals
myVis.ColumnSubtotals["Column 1"].Visible = True
myVis.ColumnSubtotals["Column 2"].Visible = False

# Display subtotals before values:
myVis.ColumnSubtotalsLayout = CrossTableSubtotalsLayout.Before
# OR
# Display subtotals after values:
myVis.ColumnSubtotalsLayout = CrossTableSubtotalsLayout.After
Welcome!

The purpose of this website is to provide a comprehensive, accurate, and efficient IronPython reference for Spotfire developers.

If you have any questions, comments, or ideas, feel free to get in touch!