---
schema_version: "1"
id: 08a64846dd137686c8e94315614f66d33ae1565b6320c5a971079d107fabde39
title: Create a Custom Object Creates 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-dailycreates.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-recipe-cou-dailycreates.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 9547f9a05f84d1221603096d6f8ee67db3b801c8de54077f633ec9d9144d1bb9
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Create a Custom Object Creates 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 search for **timestamp_DMY**.

5.  Select **Year-Month-Day**.

6.  Click **Filters**.

7.  Click **+**.

8.  Select **custom_entity_type** equals **CustomObject**.

9.  Click **Apply**.

10. Click **+**.

11. Select **operation_type** Equals **INSERT**.

12. Click **Apply**.

13. Click **Data**.

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 Creates Per Day CRM Analytics lens](https://developer.salesforce.com/media/pkg2_dev/app_analytics_cookbook_recipe_cou_creates.png)

SAQL:

```nolang
q = load "DailyAggregation";
q = filter q by 'custom_entity_type' == "CustomObject";
q = filter q by 'operation_type' == "INSERT";
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;
```
