Search code examples
listboxcalculated-columnsspotfire

Spotfire 6.5: How to check exact value in Find function


I have a document property which is being used as a filter for the reports. It is a multi select List box. I have created a calculated field (flag) which uses this expression:

if(find(Upper(Concatenate([Col1],' | ',[Col2])),Upper('$map("sum([${Property}])", ",")'))>0,"Yes", "No" )

The thing here is when I select a value from the list box property viz. "TV | HDTV" then all those values from the Data Table start Coming up which are returning position viz. "TV | HD" , "TV | HDTV" both the values come up on the graph. Values get combined in the line which I do not want. Is there any way I can do an exact match or can this formula be tweaked.

I cannot change this flag to any other data type as around 30 calculations are based on this field.

Regards,

Subro


Solution

  • Figured this on my own. I understood that the map function acts like a template. So I thought why not modify the template. Here is the code I used:

    If(Upper(Concatenate([Col1],' | ',[Col2])) in ($map("'${Property}'", ",")),"Yes","No")
    

    This works fine with my values. I checked it for many scenarios. Also for the property I used a field to populate it where in I have applied Upper so basically it holds already values which come in as Upper. @niko: Thank you for your help. I am sure it would have worked too. Apologize for the time wasted on my behalf.

    Regards,

    Subro