Search code examples
spotfiretibcospotfire-webplayerspotfire-analyst

TIBCO Spotfire expressions : How to rename a group of nest columns into new names


I have Bar chart with values colored by 2 different filters. What I need is to rename each combination of the 2 filters into just one name.

i tried to write it with CASE expression but with no luck.

below screenshot, shows what is required.

Any ideas ?

Screenshot sample : Motor Type


Solution

  • Why did you case expression not work?

    Something like that should work:

    <CASE [COLUMN] WHEN "VALUE1" then "Category A" WHEN "VALUE2" then "Category B" ELSE "Category C" END>
    

    But in your situation I would do

    <if([column 2] in ('SALA','SUPP'),'Motor category A','Motor category B')>
    

    Add this expression here (right click > custom expression) : enter image description here