top of page

Sort X-axis by a rank field (bar/column/line)

Updated: May 5, 2022

If predefined sort order is available, X-axis or chart legend can be sorted by using this script. But in some cases we may not know the sort order in advance and sorting has to be done based on a rank field in the table. Also maintenance will be easy if we sort the chart by rank field instead of widget script. This can be achieved using a script.


In order to do it, we need a rank column. For example, If we need to sort Region based on a field, we need Region and rank column (say, Region Rank)


Steps:


  1. Create line/bar/column chart

  2. Add the script to widget and update the variables:

  3. Save script and refresh the widget.


Contact us for the script - binextlevel@gmail.com


BI Next Level white logo

BI Next Level is your trusted resource for BI customization, data solutions, and expert insights. Explore practical tips, scripts, and tutorials for tools like Sisense, Python, and SQL. Let’s transform your data into impactful insights together.

Quick Links
Connect with us
Copyright © 2024. All Rights Reserved. Designed, Developed & Maintained  by Intertoons
bottom of page