---
title: "Creating a Fixed-Row Zigzag Table"
description: "*This article assumes that the user is already familiar with [Data Blocks](https://learn.assette.com/docs/data-block-basics/), [Data Objects](https://learn.assette.com/docs/data-objects-layer/), [Smart Shells](https://learn.assette.com/docs/smart-doc-overview/), [Smart Pages](https://learn.assette.com/docs/smart-pages-overview/) and the [Assette PowerPoint Editor's Advanced Settings](https://learn.assette.com/docs/powerpoint-editor-advanced-settings-overview/) and has access to the [required roles](https://learn.assette.com/docs/assette-roles-overview/).* The Fixed-Row Zigzag Table is a structured zigzag…"
url: "https://learn.assette.com/docs/creating-a-fixed-row-zigzag-table/"
updated: "2025-03-04"
category: Users / Tutorials
---

# Creating a Fixed-Row Zigzag Table

*This article assumes that the user is already familiar with [Data Blocks](https://learn.assette.com/docs/data-block-basics/), [Data Objects](https://learn.assette.com/docs/data-objects-layer/), [Smart Shells](https://learn.assette.com/docs/smart-doc-overview/), [Smart Pages](https://learn.assette.com/docs/smart-pages-overview/) and the [Assette PowerPoint Editor's Advanced Settings](https://learn.assette.com/docs/powerpoint-editor-advanced-settings-overview/) and has access to the [required roles](https://learn.assette.com/docs/assette-roles-overview/).*

The Fixed-Row Zigzag Table is a structured zigzag table format that organizes data within a predefined number of rows before wrapping to the next column or segment. This format is particularly useful for displaying grouped data while maintaining readability and space efficiency.

Unlike traditional Zigzag Tables that adjust dynamically based on content length, Fixed-Row Zigzag Tables ensure that the table maintains a consistent row structure before transitioning to a new column or table segment.

## Defining the Data Block for a Fixed-Row Zigzag Table

The table is generated using a **Transformation Data Block**, which processes financial holdings data and organizes it based on user-defined classifications. Below is an example definition in Python using constant static data.

### General Info

Begin by setting up the Data Block's General Info as shown below. The Name of the Data Block may be changed to conform with your organization's standards

| Field | Value |
| --- | --- |
| Name | Fixed_Row_Zigzag_Data_Block_Demo |
| Block Category | Transform |
| Block Type | Python |
| Output Type | Data Table |

![Creating a Fixed-Row Zigzag Table 1](https://learn.assette.com/wp-content/uploads/2025/02/image-31-1024x377.png)

### Example Definition

Below is an example definition for the Data Block. This Data Block uses static data and must be updated to accommodate your data source.

```
data = [
    # People - Products
    ["Illumina", 3.6, "Products", "People"],
    ["Eurofins", 2, "Products", "People"],
    ["Thermo Fisher", 3.6, "Products", "People"],
    ["Danaher", 2, "Products", "People"],
    ["Moderna", 3.6, "Products", "People"],
    ["Bio-Rad", 2, "Products", "People"],
    ["Vertex Pharmaceuticals", 3.6, "Products", "People"],
    ["Regeneron", 2, "Products", "People"],
    ["Amgen", 3.6, "Products", "People"],
    ["Biogen", 2, "Products", "People"],
    ["Gilead Sciences", 3.6, "Products", "People"],

    # People - Practices
    ["Mastercard", 2.8, "Practices", "People"],
    ["UnitedHealth Group", 2.6, "Practices", "People"],
    ["CVS Health", 3.2, "Practices", "People"],
    ["Cigna", 2.5, "Practices", "People"],
    ["Elevance Health", 3.0, "Practices", "People"],

    # Planet - Products
    ["Atlas Copco", 3.2, "Products", "Planet"],
    ["Wabtec", 1.9, "Products", "Planet"],
    ["Vestas Wind Systems", 3.6, "Products", "Planet"],
    ["Orsted", 3.2, "Products", "Planet"],
    ["First Solar", 2.8, "Products", "Planet"],
    ["Enphase Energy", 2.5, "Products", "Planet"],
    ["Brookfield Renewable", 3.0, "Products", "Planet"],

    # Planet - Practices
    ["IMCD", 2.2, "Practices", "Planet"],
    ["DSV", 2, "Practices", "Planet"],
    ["Schneider Electric", 3.2, "Practices", "Planet"],
    ["NextEra Energy", 2.7, "Practices", "Planet"],
    ["Siemens Gamesa", 3.1, "Practices", "Planet"],

    # Prosperity - Products
    ["TSMC", 3.6, "Products", "Prosperity"],
    ["MercadoLibre", 3.4, "Products", "Prosperity"],
    ["Alibaba", 3.2, "Products", "Prosperity"],
    ["Shopify", 2.8, "Products", "Prosperity"],
    ["Nvidia", 3.9, "Products", "Prosperity"],
    ["AMD", 3.2, "Products", "Prosperity"],

    # Prosperity - Practices
    ["Workday", 2.7, "Practices", "Prosperity"],
    ["Spotify", 2, "Practices", "Prosperity"],
    ["Salesforce", 3.3, "Practices", "Prosperity"],
    ["Intuit", 3.0, "Practices", "Prosperity"]
]

# Define the column names
columns = [
    "CompanyName", "HoldingWeight", "Class1Level1", "Class2Level1"
]
if(params.__len__()>0):
    for key in params.keys():
        if str(key).lower()=="customclassschemegroup1":
            CustomClassSchemeGroup1 = params.get(key) or ""
        if str(key).lower()=="customclassschemegroup2":
            CustomClassSchemeGroup2 = params.get(key) or ""

# Create the DataFrame
df = pd.DataFrame(data, columns=columns)

# CustomClassSchemeGroup1 = "Products"
# CustomClassSchemeGroup2 = "People"

filtered_data = df[(df['Class1Level1'] == CustomClassSchemeGroup1) & (df['Class2Level1'] == CustomClassSchemeGroup2)]

outputValues = dict()
outputValues["ReportEndDate"] = "2023-12-31T00:00:00"
outputValues["StrategyName"] = 'Developed EAFE All Cap'
outputValues["TotalProductWeight"] = 53
outputValues["TotalPracticesWeight"] = 46

response["data"] = filtered_data.to_dict(orient='records')
response["values"]=  outputValues
```

### Metadata

#### Columns

In the Metadata tab, select "Columns" and create 4 columns as shown in the table and image below

| Name | Data Type |
| --- | --- |
| CompanyName | Text |
| HoldingWeight | Decimal Number |
| Class1Level1 | Text |
| Class2Level2 | Text |

![Creating a Fixed-Row Zigzag Table 2](https://learn.assette.com/wp-content/uploads/2025/02/image-34-1024x668.png)

#### Request Parameters

| Name | Data Type |
| --- | --- |
| AsofDate | Date |
| AccountCode | Text |
| TimePeriod | Text |
| CustomClassSchemeGroup1 | Text |
| CustomClassSchemeGroup2 | Text |

![Creating a Fixed-Row Zigzag Table 3](https://learn.assette.com/wp-content/uploads/2025/02/image-33-1024x699.png)

#### Output Variables

Create the following 4 output variables

| Name | Data Type |
| --- | --- |
| Report Date | Date |
| StrategyName | Text |
| TotalProductWeight | Integer Number |
| TotalPracticesWeight | Integer Number |

![Creating a Fixed-Row Zigzag Table 4](https://learn.assette.com/wp-content/uploads/2025/02/image-35-1024x630.png)

### Dependencies

Open the Data Block's Dependency Tab and add the [CalculationEnv Data Block](https://learn.assette.com/docs/calculation-env-data-block/) as a dependency.

![Creating a Fixed-Row Zigzag Table 5](https://learn.assette.com/wp-content/uploads/2025/02/image-36-1024x261.png)

### Preview

When previewing the Data Block, default values should already be provided for you. Otherwise, enter the following value:

```
{
     "AsofDate":"12/31/2023",
     "AccountCode":"2916",
     "TimePeriod":"6MT",
     "CustomClassSchemeGroup1":"Products",
     "CustomClassSchemeGroup2":"People"
}
```

If everything has been done correctly, when previewing the Data Block, the preview should return the data from the definition for the "CustomClassSchemeGroup1":"Products" and "CustomClassSchemeGroup2":"People"

## Data Object Setup

After setting up the Data Block, users will need to set up a Data Object to handle the data. Start by setting up the General Info Tab

### General Info

| Field | Value |
| --- | --- |
| Display Name | Fixed-Row Zigzag Table |
| Name | FixedRowZigzagTable |
| Usage | Library |
| Use For | Table |

Styling Options can also be set up at this point, if desired. See Styling, for more.

### Data Source

Set up the Data Object's data source using the Data Object created in the previous steps

![Creating a Fixed-Row Zigzag Table 6](https://learn.assette.com/wp-content/uploads/2025/02/image-37-1024x197.png)

### Data Settings

Create the necessary Data Settings for the Data Object.

| Date Setting Name | Data Type | Display at | Default Value |
| --- | --- | --- | --- |
| AsofDate | Date | Generation Time |  |
| AccountCode | Text | Generation Time |  |
| TimePeriod | Text | Design Time |  |
| CustomClassSchemeGroup1 | Text | Design Time | Products |
| CustomClassSchemeGroup2 | Text | Design Time | People |

![Creating a Fixed-Row Zigzag Table 7](https://learn.assette.com/wp-content/uploads/2025/02/image-38-1024x434.png)

## Columns

| Name | Data Type |
| --- | --- |
| CompanyName | Text |
| HoldingWeight | Decimal Number |
| Class1Level1 | Text |
| Class2Level1 | Text |

## Grouping

In this example, grouping is not needed but may be optionally set up. See [Grouping Tab](https://learn.assette.com/docs/grouping-tab/) for more information.

## Sorting

In this example, sorting is not needed but may be optionally set up. See [Sorting](https://learn.assette.com/docs/sorting-tab/)for more information.

## Style Classes

*Note: colors can also be set up using standard PowerPoint, though this route won't allow for dynamic colors based on Data Settings— this route may be easier in cases where the color and style is static.*

In this example, we have used Style Classes to determine the background color the various sections (i.e., People, Planet, Practices, and Products). In the Styling Classes Tab, set up each of the styles in the "Table" tab. Shown below, we have set up "PeopleProducts" color as light blue. Set up additional styles, as needed.

![Creating a Fixed-Row Zigzag Table 8](https://learn.assette.com/wp-content/uploads/2025/02/image-42-1024x696.png)

Once the Style Classes have been set up, don't forget to go back to the [General Tab](https://learn.assette.com/docs/general-tab/) and set up the conditions for the Styling Options. Below is a sample condition to apply the "PeopleProduct" style used above.

```
CustomClassSchemeGroup1="Products" and CustomClassSchemeGroup2="People"
```

![Creating a Fixed-Row Zigzag Table 9](https://learn.assette.com/wp-content/uploads/2025/02/image-43-1024x345.png)

### Row Types

The required rows should already exist by default and do not require editing.

![Creating a Fixed-Row Zigzag Table 10](https://learn.assette.com/wp-content/uploads/2025/02/image-44-1024x538.png)

### Output Variables

Output Variables should already be set up by default if the Data Block created in the previous steps has been configured correctly.

![Creating a Fixed-Row Zigzag Table 11](https://learn.assette.com/wp-content/uploads/2025/02/image-45-1024x432.png)

## Smart Shell Setup

Once the Data Block and Data Object have been created, users can set up the Smart Shell.

Start by creating

### Advanced Settings & Zigzag

In order to have the table to zigzag, users need to open the Fabrication panel and click on [Advanced Settings](https://learn.assette.com/docs/powerpoint-editor-advanced-settings-overview/). Next, on the [General Tab](https://learn.assette.com/docs/general-tab/), set the "Table Type" to "Zigzag"— this allows users to use [the Zigzag Tab](https://learn.assette.com/docs/zigzag-tab/) in the Advanced Settings. Set the "Row Count" to the appropriate value which defines the number of data rows that should appear before wrapping or zigzagging to a new column or slide. In this example, we have set the Row Count to 7.

![Creating a Fixed-Row Zigzag Table 12](https://learn.assette.com/wp-content/uploads/2025/02/image-40.png)
