Advanced Mode
Sortment’s Advanced Mode empowers data-savvy users to define custom attributes using either a visual expression builder or SQL logic, depending on the attribute type. This functionality allows you to create powerful, structured metrics and dimensions that go beyond natural language-based AI prompts.
💡 Tip: For most users, AI-based attribute creation is sufficient. Use Advanced Mode when you wish to define attributes manually.
Creating a calculated attribute using advanced mode
Sortment provides an Advanced option to create calculated attributes
Open the attributes section:
Click the star-shaped icon (
✶) in the left or top navigation bar.This opens the Attribute page, where you can view, manage, and create new attributes.

Step 1: Click “New Attribute”
Start by clicking the “+ New Attribute” button at the top right of the Attribute page. Choose calculated attributes.
Step 2: Choose attribute type
Select "Advanced Mode" as the creation method
Step 3: Define attribute settings
Data source: Choose the relevant table (Eg.,
Users,Accounts)
Step 4: Attribute details:
You'll be presented with the new calculated attribute screen, enter:
Attribute Name : Enter descriptive name of the attribute (e.g.,
Max Premium Ridefare)Description (Optional): Provide additional context or purpose of the attribute. (e.g.,
Highest fare a user has paid in a ride)Tags (Optional): Add relevant tags to categorise or identify the attribute.
Step 5: Define attribute logic
Metric attributes (Visual builder - No code)
Use the dropdown-based builder to define logic without SQL:
Property : Select the property from the dropdown (e.g,
Ridefare)Function : Choose the aggregate function (e.g.,
Max).Filter (Optional): Add filters to restrict the data in the calculation (e.g.,
Ride Type = Premium)
Dimension attributes (SQL Editor)
Use SQL logic to create more advanced or real-time attributes.
Example syntax for a dimension attribute:
Step 6: Finishing the attribute
Use the preview results button to verify the output.
Click finish to save the attribute.
Last updated
Was this helpful?