---
schema_version: "1"
id: 14cfa2da2a4b3ba96915bf2c8c1a5580828bd54aef41975aebd1ed403e44fea7
title: Create a Daily Unique Users 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-csm-dailyuu.md
canonical_url: https://developer.salesforce.com/docs/platform/pkg2-dev/guide/app-analytics-cookbook-recipe-csm-dailyuu.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6655d0a857d3a95a7c3dbcd72f9dc5b48e52e59246def46d25766b2a117faeb3
products:
  - Second-Generation Managed Packaging Developer Guide
  - merged-docs
---

# Create a Daily Unique Users Recipe

This recipe produces a unique count of users by day.

In your org in Analytics Studio in CRM Analytics:

1.  In All items on the Datasets tab, select your DailyAggregation dataset.

2.  Under Bar Length, click **Count of Rows**.

3.  Click **Unique**.

4.  Select **user_id_token**.

5.  Select **Charts**.

6.  Click **Column**.

7.  Under Bars, click **+** and search for `timestamp_DMY`.

8.  Select **Year-Month-Day**.

9.  Click **Save**.

10. Name your lens `Daily Unique Users`.

11. Select your PartnerIntelligence app.

12. Click **Save**.

## Example

![A sample Daily Unique Users CRM Analytics lens](https://developer.salesforce.com/media/pkg2_dev/app_analytics_cookbook_recipe_csm_dailyuu.png)

SAQL:

```nolang
q = load "DailyAggregation";
q = group q by ('timestamp_derived_DAY_formula_Year', 'timestamp_derived_DAY_formula_Month', 'timestamp_derived_DAY_formula_Day');
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', unique('user_id_token') as 'unique_user_id_token';
q = order q by 'timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Month~~~timestamp_derived_DAY_formula_Day' asc;
q = limit q 2000;
```
