Search code examples
spotfire

How to Create a Pareto Plot in Spotfire


I am trying to plot a Pareto plot in Spotfire.

I would like it to look like this (I have used some very basic input data):

enter image description here

But so far I can only make it look like this:

enter image description here

I have done this by creating a hierarchy in 'column properties' and ordering names from lowest to highest experience, then flipping both the x and y axis, so that my curve looks like a Pareto plot, but it is not quite the same.

Is there a more efficient way to do this in spotfire that would allow correct y axis display and also allow the names to go along the bottom?

Any help is greatly appreciated.

Thanks


Solution

  • I think I have an answer for you. In this you do not have to flip the y-axis, and I can get the names in the x-axis, but I still use a hierarchy. I'm not sure it's more efficient, but here goes.

    First, I created a Hierarchy defined as:

    CREATE  NESTED HIERARCHY [New hierarchy (2)]
      [yearsOfExp] AS [yearsOfExp],
      [name] AS [name]
    

    This allowed me to order the category axis by years of experience.

    Secondly, I created a calculated column defined as:

    Sum([yearsOfExp]]) over (AllNext([yearsOfExp]]))
    

    I then created a line chart. The hierarchy is the x axis and the calculated column is the y axis. When setting the x axis, be sure to "reverse scale". enter image description here

    I hope this does what you're looking for. Good luck. Any questions, just ask.