Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Create a Weekly Unique Users Recipe

This recipe produces a unique count of users by week.

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-Week.
  9. Click Save.
  10. Name your lens Weekly Unique Users.
  11. Select your PartnerIntelligence app.
  12. Click Save.

Example

A sample Weekly Unique Users CRM Analytics lens
SAQL:
1q = load "DailyAggregation";
2q = group q by ('timestamp_derived_DAY_formula_Year', 'timestamp_derived_DAY_formula_Week');
3q = foreach q generate 'timestamp_derived_DAY_formula_Year' + "~~~" + 'timestamp_derived_DAY_formula_Week' as 'timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Week', unique('user_id_token') as 'unique_user_id_token';
4q = order q by 'timestamp_derived_DAY_formula_Year~~~timestamp_derived_DAY_formula_Week' asc;
5q = limit q 2000;