1

Could anyone help me with a Spotfire issue?

3 data types are avalialbe. Locations(sting), areas within these locations(string) and sum of hours associated with the areas and therefore the locations.

Objective: I'm trying to show data value axis: sum of hours, category axis - top 10 areas (sting data). I want to do this for all the locations available (trellis by location) and sort the bars descending in sum of hours, all in one bar chart visualisation. When I did this with trellis, Spotfire essentially trellised the original graph, i.e. to show where the top 10 sum of hours are distributed throughout the locations. This is not what I want - I want a dynamic category axis that will show me the areas of top 10 largest sum of hours per each location.

How do I do this? My idea was that maybe I could add a custom expression to the category axis before trellising or to add a calculated column to help, but I'm not sure how exactly this could solve the problem. Could anybody help?

Julia
  • 11
  • 3

2 Answers2

0

If you Calculate New Column where you rank your values per variable then add this column on the Category Axis, your trellis panels will order individually.

If there are the same amount of unique values per variable then use DenseRank(). Otherwise use Rank() with "ties.method=first" since DenseRank() will leave gaps. (Note: using Rank() with "ties.method=first" will have inconsistencies in ordering when values are the same on an axis).

In your example, the new column you want to calculate is something like:

Rank([sum of hours],[areas within these locations],"ties.method=first")
RobbieM
  • 11
  • 2
-2

Did you try the 'Sort bars by value' option ?

enter image description here

Jacek Sierajewski
  • 613
  • 1
  • 11
  • 33
  • Hi yes I did! So if I do that, the sorts bar by value sorts the total bars by value, not in the individual trellis panels... The problem is I have a lot of data so finding a way to show only the top ten within each area would be a great help... Thanks anyway! – Julia Jul 14 '15 at 13:36