title: In a Tableau calculated field how can I check if a record exists that matches my parameters
body: <p>I have a table like this (but with many more columns):</p>
  <pre><code>|---------------------|------------------|------------------|
  |      Country        |        Year      |       Sales      |
  |---------------------|------------------|------------------|
  |          US         |        2018      |        50        |
  |---------------------|------------------|------------------|
  |          UK         |        2018      |        10        |
  |---------------------|------------------|------------------|
  |          US         |        2019      |        40        |
  |---------------------|------------------|------------------|
  |          US         |        2020      |                  |
  |---------------------|------------------|------------------|
  
  </code></pre>
  <p>I have a dashboard that allows users to choose two parameters, Country and Year, and then it displays some sales data and charts. I want to show a warning if the user chooses a country and year combination that does not exist, such as &quot;UK&quot; and &quot;2019&quot;</p>
  <p>I have tried making a calculated field using IF/THEN to return a warning text string, but I can't figure out how to check if a record rather than value exists.</p>
  <p><code>IF ISNULL([Sales]) THEN &quot;No record exists&quot; END </code> Does not work because it returns that warning for a selection of &quot;US&quot; and &quot;2020&quot; parameters.</p>