title: Sortby function combined with Unique and filter functions: how to use it correclty?
body: <p>I have the following table in excel, namely &quot;table1&quot;:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>CHECK</th>
  <th>City</th>
  <th>Country</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>Yes</td>
  <td>New York</td>
  <td>USA</td>
  </tr>
  <tr>
  <td>Yes</td>
  <td>Barcelona</td>
  <td>Spain</td>
  </tr>
  <tr>
  <td>No</td>
  <td>Rome</td>
  <td>Italy</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The field &quot;Check&quot; is dynamically calculated with a formula</p>
  <p>So far, I am using the following formula in another sheet to show only the Check= &quot;Yes&quot; rows:</p>
  <p>=SORT(UNIQUE(FILTER(Table1;Table1[CHECK]=&quot;YES&quot;;&quot;&quot;));3;1)</p>
  <p>How can I sort by Country first, and then by the city in alphabetical order?</p>
  <p>I tried the following but I get an erorr:</p>
  <p>=SORTBY(UNIQUE(FILTER(Table1;Table1[CHECK]=&quot;YES&quot;;&quot;&quot;));Table1[Country];1;Table1[City];1)</p>
  <p>Any suggestion? It should be easy but I am struggling to figure out how to fix it.</p>
  <p>Many thanks!</p>