Search code examples
spotfire

Spotfire - choose categories to be displayed in Line chart


Is it possible to choose only few categories to be included in line chart without using filters?

Example:

I have Spotfire table which shows sum of fruits sold.

enter image description here

I want only apples and oranges to be displayed in my line chart without using filters.

Thank you!


Solution

  • There are different options:

    If you want to hide watermelon rows, You can limit the data at the visualization level using visualization>properties>show/hide items or by limiting the rows using visualization>properties>Data>Limit data using expression:

    [fruit] in ("Apples","Oranges")
    

    or

    [fruit] <> "Watermelons"
    

    To limit data at the axis level, say you want to display Apples and Oranges and group all the others, you can use a custom expression in your axis. For example:

    if ([fruit] in ("Apples", "Oranges"),[fruit],"Other Fruits")