Need to count the dimension Items | Community
Skip to main content
Bhushan_Mahajan
Level 2
February 14, 2025
Solved

Need to count the dimension Items

  • February 14, 2025
  • 3 replies
  • 1144 views

Hi All,

 

I am trying to get distinct count of a dimension in a metric. I have tried using Approximate count distinct however its not giving exact nos. I am aware that it is using some Log Log algorightm to count and has 0-5% change margin from exact no. Wanted to check if there is any way around to get the exact count. Appreciate the help here. Thank you!

Best answer by PoornimaThakur5

Hello - as explained already, the Approximate Count Distinct is the built-in way to get a distinct count of a dimension in Adobe workspace. However, Adobe Analytics does not have a built-in "exact" distinct count metric.

If you'd like to try your hand at few workarounds, then I suggest the following:

  1. Data Warehouse Export: If you need exact distinct counts, export your data to Adobe Data Warehouse and use Excel, SQL, or Python to calculate the distinct count manually
  2. Customer Attributes or Classifications: If you are tracking something like distinct users or orders, you could store those values as Customer Attributes or Classifications in Adobe Analytics and reference them separately.
  3. Adobe Data Feeds: If you have access to Adobe Data Feeds, you can process the raw hit-level data using BigQuery, Snowflake or any database and run an exact DISTINCT COUNT query there.

Good Luck!

3 replies

christel_guidon
Adobe Champion
Adobe Champion
February 14, 2025

Hello,

Are you trying to understand how many unique values come into an eVar for example?

If so, just do this:

If you don't trust that it's working for some reason, just take a variable that has a low amount of values, sum them up on your own, and compare to this metric. I have no issues with this and use it everywhere

Bhushan_Mahajan
Level 2
February 17, 2025

Approximate count distinct is not showing exact count, So wanted to check if there are any way around to get the exact count of dimension items.

Harveer_SinghGi1
Community Advisor
Community Advisor
February 14, 2025

Hi @bhushan_mahajan ,

I don't think it is possible to create a standalone metric for exact count the way we can create for approx count for a dimension. The best possible option for exact count is to use Row Count on the ranked report of the dimension that you are interested in.

If you are using CJA, then it becomes very easy by utilizing Count Distinct operator of Summarize function in CJA Derived Fields.

Cheers!

Bhushan_Mahajan
Level 2
February 17, 2025

Row Count is showing the correct count but its not feasible as we have pull the dimesion in the rows to get the exact count. Thank you for the reply!

PoornimaThakur5
Adobe Champion
PoornimaThakur5Adobe ChampionAccepted solution
Adobe Champion
February 22, 2025

Hello - as explained already, the Approximate Count Distinct is the built-in way to get a distinct count of a dimension in Adobe workspace. However, Adobe Analytics does not have a built-in "exact" distinct count metric.

If you'd like to try your hand at few workarounds, then I suggest the following:

  1. Data Warehouse Export: If you need exact distinct counts, export your data to Adobe Data Warehouse and use Excel, SQL, or Python to calculate the distinct count manually
  2. Customer Attributes or Classifications: If you are tracking something like distinct users or orders, you could store those values as Customer Attributes or Classifications in Adobe Analytics and reference them separately.
  3. Adobe Data Feeds: If you have access to Adobe Data Feeds, you can process the raw hit-level data using BigQuery, Snowflake or any database and run an exact DISTINCT COUNT query there.

Good Luck!