title: aws quicksight - distinct_countif function
body: <p>I'm working in aws quicksight.
  I’ll appreciate your advise about the below dataset &amp; calculation</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>transId</th>
  <th>date</th>
  <th>amount</th>
  <th>user</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>100001</td>
  <td>12/06/2022</td>
  <td>61</td>
  <td>AAA</td>
  </tr>
  <tr>
  <td>100002</td>
  <td>10/06/2022</td>
  <td>AAA</td>
  <td></td>
  </tr>
  <tr>
  <td>100003</td>
  <td>08/06/2022</td>
  <td>39</td>
  <td>null</td>
  </tr>
  <tr>
  <td>100004</td>
  <td>08/06/2022</td>
  <td>9</td>
  <td>BBB</td>
  </tr>
  <tr>
  <td>100005</td>
  <td>07/06/2022</td>
  <td>100</td>
  <td>BBB</td>
  </tr>
  <tr>
  <td>100006</td>
  <td>07/06/2022</td>
  <td>8</td>
  <td>CCC</td>
  </tr>
  <tr>
  <td>100007</td>
  <td>04/06/2022</td>
  <td>94</td>
  <td>AAA</td>
  </tr>
  <tr>
  <td>100008</td>
  <td>02/06/2022</td>
  <td>58</td>
  <td>null</td>
  </tr>
  <tr>
  <td>100009</td>
  <td>02/06/2022</td>
  <td>12</td>
  <td>null</td>
  </tr>
  <tr>
  <td>100010</td>
  <td>31/05/2022</td>
  <td>46</td>
  <td>BBB</td>
  </tr>
  <tr>
  <td>100011</td>
  <td>30/06/2022</td>
  <td>68</td>
  <td>CCC</td>
  </tr>
  <tr>
  <td>100012</td>
  <td>30/06/2022</td>
  <td>89</td>
  <td>DDD</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I would like to count distinct the number of users in a window of 7 days backwards.
  the result will be for 12/06 &amp; 05/06 dates for example-</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>date</th>
  <th>usersCountd</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>12/06</td>
  <td>3</td>
  </tr>
  <tr>
  <td>05/06</td>
  <td>4</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>unfortunately, windowRunningCount didn’t solve it.</p>
  <p>Thanks,
  Amihai</p>