cancel
Showing results for 
Search instead for 
Did you mean: 
intapiuser
Community Team Member
Community Team Member
In a custom column, add a prefix number followed by a period and a space to the dimensions you want to sort in pivot.
For example, if we have a column called Category with the following categories:
  • First Category
  • Another Category
Create a custom column called Ordered Category and write:
case 
when [Category] = 'First Category' then '1. First Category' 
when [Category] = 'Another Category' then '2. Another Category'
end
Use this column in your pivot table.
Next, after creating the pivot table with the correct ordered dimensions we will remove the number and period with the space using the following widget script.
Open the widget script editor and paste:
widget.on('ready', function(){
 $('.table-grid__tbody .table-grid__content__inner:contains(. )', element).each(function(i, v){
  var thisText = $(this).text()
  var periodIndex = thisText.indexOf('.')
  var textLength = thisText.length
  var returnString = thisText.substring(periodIndex + 2, textLength)
  $(this).text(returnString)
 })
})
Version history
Last update:
‎03-02-2023 09:08 AM
Updated by:
Contributors
Community Toolbox

Recommended quick links to assist you in optimizing your community experience:

Developers Group:

Product Feedback Forum:

Need additional support?:

Submit a Support Request

The Legal Stuff

Have a question about the Sisense Community?

Email [email protected]

Share this page: