SETCOLUMNSORT

Sort a specific column in ascending or descending order. Enable absolute sorting to ignore signs and sort based on magnitude.

Syntax

SETCOLUMNSORT(column, type, isAbsoluteSort)

Arguments #

column – The column to sort. Use the COLUMNS identifier to select a specific column. Required.

type - Asc or Desc. Required.

isAbsoluteSort - Set to TRUE to enable absolute sort. Required.

Example

SETCOLUMNSORT(COLUMNS.[Qtr 1 > Actuals],"Asc",TRUE)
//Sorts quarter 1 actuals in ascending order with absolute sorting enabled

SETCOLUMNSORT script

Notice how the sort order changes when absolute sort is enabled and disabled.

Changing the sort order with scripts

Fabric Plan
Enterprise planning, integrated with PowerTable and Intelligence, native to Microsoft Fabric. Co-engineered with Lumel.
CERTIFIED BY
Fabric Planning is certified by IBCS
Microsoft, Azure, Copilot, Excel, Fabric IQ, Microsoft Entra, Microsoft Fabric, Microsoft Teams, OneLake, Outlook, Power Automate, Power BI and SharePoint are trademarks of the Microsoft group of companies. IBCS is a registered trademark of IBCS Association. All other trademarks are the property of their respective owners.

This community is operated independently by Lumel. Nothing on this site constitutes a representation or warranty by Microsoft.