---
schema_version: "1"
id: cd3403370b7f996af26c71765f73990667f1e4ef9a7977f134ea4f6db389b21d
title: Create a Custom Object Updates Per Day Recipe
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform-pkg-exchange/managed_packaging/guides/second-generation/appexchange/app-analytics/app-analytics-cookbook/app-analytics-cookbook-recipe-cou-dailyupdates.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-recipe-cou-dailyupdates.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 637994e06a3881bc188c77c3b4fcadb9dcb147a80ce50e1beb2ff4b504448ecf
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Create a Custom Object Updates Per Day Recipe

This recipe produces a unique count of how many times per day a custom object was created.

In your org in Analytics Studio in CRM Analytics:

1.  In All items on the Datasets tab, select your DailyAggregation dataset.

2.  Select **Charts**.

3.  Click **Column** and leave Bar Length as **Count of Rows**.

4.  Under Bars, click **+** and select **timestamp_DMY**.

5.  Select **Year-Month-Day**.

6.  Click the **Filters** tab.

7.  Click **+**.

8.  Select **custom_entity_type** Equals **CustomObject**

9.  Click **Apply**.

10. Click **+**.

11. Select **operation_type** Equals **UPDATE**.

12. Click **Apply**.

13. Click the **Data** tab.

14. Under Trellis, click **+**.

15. Select **custom_entity**.

16. Click **Save**.

17. Name your lens `Custom Object Creates Per Day`.

18. Select your PartnerIntelligence app.

19. Click **Save**.

## Example

![A sample Custom Object Updates Per Day CRM Analytics lens](https://developer.salesforce.com/media/pkg2_dev/app_analytics_cookbook_recipe_cou_updates.png)

SAQL:

```nolang
q = load "DailyAggregation";
q = filter q by 'custom_entity_type' == "CustomObject";
q = filter q by 'operation_type' == "UPDATE";
q = group q by ('timestamp_derived_DAY_formula_Year', 'timestamp_derived_DAY_formula_Month', 'timestamp_derived_DAY_formula_Day', 'custom_entity');
q = foreach q generate 'timestamp_derived_DAY_formula_Year' + "~~~" + 'timestamp_derived_DAY_formula_Month' + "~~~" + 'timestamp_derived_DAY_formula_Day' as 'timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Month~~~timestamp_derived_DAY_formula_Day', 'custom_entity' as 'custom_entity', count() as 'count';
q = order q by ('timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Month~~~timestamp_derived_DAY_formula_Day' asc, 'custom_entity' asc);
q = limit q 2000;
```
