Expressions

The expressions property specifies new columns in Perspective that are created using existing column values or arbitary scalar values defined within the expression. In <perspective-viewer>, expressions are added using the "New Column" button in the side panel.

A custom name can be added to an expression by making the first line a comment:

const view = await table.view({
    expressions: { '"a" + "b"': '"a" + "b"' },
});
view = table.view(expressions=['"a" + "b"'])