Question: I am using the MongoDB shell to execute the query in the below query.

```
db.analytics.aggregate(
    [{ "$match": { "community": ObjectId("5e1ad5b6910a72a9bd02ccc8") } },
    {
        "$project": {
            "_id": 1, "date": 1, "week": { "$week": "$date" },
            "total": { "$add": ["$data.postCount", "$data.commentCount", "$data.voteCount.totalVotes", "$data.likeCount"] }
        }
    }]) 

```

Now I am getting it like in this below picture.

[![Enter image description here](https://i.stack.imgur.com/Q5pJ6.jpg)](https://i.stack.imgur.com/Q5pJ6.jpg)

In the above picture, I have converted the date to week number, but now I need only the maximum date of each week total value only. How can I fix this?

Answer: 
Simply add `[nzData]="['']"` to your subtable

This messag is visible when `nzData` is empty in `nz-table` 

```
<nz-table [nzData]="['']">
  <thead>
  <tr>
    <th nzWidth="25%">Location Code</th>
    <th nzWidth="25%">Location Description</th>
    <th nzWidth="25%">Device Code</th>
    <th nzWidth="25%">Device Description</th>
  </tr>
  </thead>
  <tbody>
  <tr>
    <td nzBreakWord [textContent]="data.locationCode"></td>
    <td nzBreakWord [textContent]="data.locationDescription"></td>
    <td nzBreakWord [textContent]="data.deviceCode"></td>
    <td nzBreakWord [textContent]="data.deviceDescription"></td>
  </tr>
  </tbody>
</nz-table>

```
Just add `nzTemplateMode` to your nz-table

```
<nz-table nzTemplateMode>
  <thead>
    <tr>
      <th>Company</th>
      <th>Contact</th>
      <th>Country</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Alfreds Futterkiste</td>
      <td>Maria Anders</td>
      <td>Germany</td>
    </tr>

  </tbody>
</nz-table>

```