Articles in this section
Category / Section

How to apply custom sorting in Bold BI

Published:

In BoldBI, custom sorting is not directly supported. However, you can achieve this using an expression column. Follow the steps below to create a custom sort order for your data.

Step 1: Create an Expression Column

Create an expression column using the following formula:

IF(First choice, 1, IF(Second choice, 2, 0-if no other choices))

Consider you have date column (Month-Name) like below and you want it should be sorted like Jan-2021, Feb-2021, Mar-2021, Jan-2022, Feb 2022, … in widgets.

image.png

Create an expression like below

if([Month-Name]='Jan-2021', 1, if([Month-Name]='Feb-2021', 2, if([Month-Name]='Mar-2021', 3, if([Month-Name]='Jan-2022', 4, if([Month-Name]='Feb-2022', 5, if([Month-Name]='Mar-2022', 6, 0))))))

image.png

This expression assigns a numerical value to each month, allowing you to sort the data based on these values.
image.png

Step 2: Sort the Dimension Value Based on the Expression

After creating the expression column, sort the dimension value based on the expression to achieve the desired month order.
Click the settings icon of the column as shown below and then click the Sort option. It will open the Advanced Sorting Option window

image.png

image.png

Before Sorting

image.png

After Sorting

image.png

By following these steps, you can apply custom sorting order for your data in BoldBI.

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
IJ
Written by Israel Jebaraj Chandirakumar
Updated:
Comments (0)
Please  to leave a comment
Access denied
Access denied