10 Replies Latest reply on Jun 25, 2018 11:50 PM by sai lakshmi

    Need help with calculation to find a specific word from a dimension

    sai lakshmi

      Hi All,


      I have a dimension named status which is of string data type. The data is as follows:




      But I want to filter the values which contain the word "inpatient" irrespective of the position and the case.The values which contain the word "inpatient" should be displayed in the view remaining should be filtered out.


      Solutions I tried:


      1.I tried to give a wild card condition in the filter to filter the values which contains "inpatient"


      The result is something like this:



      I was not able to get the other values like "in-patient" ,"in-patient hospital" etc.,.


      2. So tried to write calculation. For that, I created a parameter by providing all the possible values in the list.



      The calculation I wrote is as follows:


      a. IF  [status search string] = 'inpatient' THEN FIND([Status],[status search string]) END







      b. IF  CONTAINS([Status],[status search string]+" ") THEN  [status search string] END






      Desired output:


      It should display all  values from the dimension which contains the text " inpatient" in different formats.



      Required help:


      Required help in writing a calculation to get the desired output.


      Have attached the twbx file for your reference.your help is highly appreciated.


      Thanks & Regards

      sai lakshmi