Search code examples
expressionscatter-plotspotfire

spotfire custom expression for scatter plot


I have this data table:

| Name | Val | Month|
| -----| ----| -----|
| A    | 3   | Jan  |
| B    | 2   | Jan  |
| A    | 1   | Feb  |
| B    | 4   | Feb  |

and I'd like a scatter plot comparing A's values to B's values by putting all A.Vals on the Y axis and all B.vals on the X axis. Is there a custom expression I could use for that?


Solution

  • I don't think you can with the table as it is, because you would be trying to plot different rows on the X and Y axis. The simplest thing would be to pivot your table, for example like adding this transformation:

    Row Identifiers: Month

    Column Titles: Name

    Values and aggregation methods: None(Val)

    Transfer columns: None

    You end up with a table with columns Month, (Val) for A, (Val) for B which you can simply plot.