1 Reply Latest reply on Feb 3, 2017 3:12 AM by chris monger

# DOES NOT CONTAIN FUNCTION

Hi All,

I am struggling with a calculated field. I am essentially comparing two different scores and if a score is >/< or equal to a numeric or qualitative scoring I am assigning a value. I am using that value to create a performance indicator using the shapes within my worksheet. The problem here is that one measure of which contains the word “PSI” uses both scoring types. However, I want it to only pick up the value when it is using the “Compared to National” score. This would be easy if I could wrap the beginning of my calculation with a Does not contain “PSI” and that would solve this issue but I can’t seem to find a way to do that. Otherwise, I am getting a NULL that overlaps on top of the KPI. Please note,I have the begning of the calculated field wrapped in STR since it was numerical so that I could compare both in one calculated field.

IF STR([Hospital Compare Most Recent Score])<STR([Target]) Then "Outperformed"

ELSEIF  STR([Hospital Compare Most Recent Score])>STR([Target]) THEN "Underperformed"

ELSEIF STR([Hospital Compare Most Recent Score])=STR([Target]) THEN "EQUAL"

ELSEIF Contains([HNMC Internal Measure ID], "PSI") AND  [Hospital Compare Compared to National] = "No Different than the National Rate" then "Equal" ELSEIF Contains([Internal Measure ID], "PSI") AND  [Hospital Compare Compared to National]= "Worse than the National Rate" then "Underperformed" ELSEIF Contains([Internal Measure ID], "PSI") AND  [Hospital Compare Compared to National]= "Better than the National Rate" then "Outperformed" ELSEIF Contains([Internal Measure ID], "PSI") AND  [Hospital Compare Compared to National] = "Not Available" then "Not Available" ELSEIF Contains([Internal Measure ID], "PSI") AND  [Hospital Compare Compared to National]= "Number of Cases Too Small" then "Number of Cases Too Small" else "" END

• ###### 1. Re: DOES NOT CONTAIN FUNCTION

If you use 'not' before contains it will give you the reverse, so in this case does not contain.

In an if statement it would look like below.

if not contains("string","substring") then x end