Michiel van den Munckhof Posted July 14, 2021 Share Posted July 14, 2021 Hello Tibco Community, In Spotfire I am often working with large data tables containing many columns. I would like to change the order of certain columns, based on the values of a certain row. Basically what I am trying to achieve is very much similar to "sort left to right" in Excel. Sometimes the row values used to sort the columns are numeric, other times they are strings. Since my tables contain many columns, and I want to sort based on the values on different rows, manually dragging them is not a feasible option. I searched through the documentation and forum posts but could not find a way to automate this. Anyone has an idea how to do this in Spotfire Many thanks in advance for your help! Example table (before sorting columns): Row Property Sample 1 Sample 2 Sample 3 Sample 4 Sample 5 1 Blue 1 1 0 1 2 2 Yellow 2 0 1 2 1 3 Orange 1 0 0 2 1 4 Green 1 2 2 0 0 Example table, after sorting the sample columns based on the values in row 3: Row Property Sample 2 Sample 3 Sample 1 Sample 5 Sample 4 1 Blue 1 0 1 2 1 2 Yellow 0 1 2 1 2 3 Orange 0 0 1 1 2 4 Green 2 2 1 0 0 Link to comment Share on other sites More sharing options...
David Boot-Olazabal Posted July 19, 2021 Share Posted July 19, 2021 Hi Chris, See attached example dxp for a possible solution. I have transformed your table first (unpivot transformation) after which I used it in a crosstab. You then have the possibility to sort by row, in your case row nr. 3. Kind regards, David Boot-Olazabal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now