Count of an Audience Attribute - AEP | Community
Skip to main content
Level 4
April 29, 2024
Solved

Count of an Audience Attribute - AEP

  • April 29, 2024
  • 1 reply
  • 875 views

Hello, 

 

I'm just trying to figure out the easiest way for me to get a count of Country Codes that exist in an Audience I created. I tried using the Query Service, but that was very confusing, and not sure it queries Audiences.

 

Can someone please guide me in how I can just easily understand how to count my audience attributes?

 

Montez 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Danny-Miller

@montezh2001 The challenge you are running into is the result of an audience is if you qualified for it or not and the timestamp it qualified.  It doesn't store the attribute value(s) that made it qualify at that point in time.  If you want just a grouping of values for country code you may want to just use Query Service or CJA.

Both query the Data Lake, but audiences as you may have discovered are based on Profile.  But in your case, a single attribute, it doesn't make any difference if the attribute is stored in one dataset.

Your SQL for QS should look something like:

SELECT countryCode, COUNT(1) from dataset group by countryCode

 

1 reply

Danny-Miller
Adobe Employee
Danny-MillerAdobe EmployeeAccepted solution
Adobe Employee
June 10, 2024

@montezh2001 The challenge you are running into is the result of an audience is if you qualified for it or not and the timestamp it qualified.  It doesn't store the attribute value(s) that made it qualify at that point in time.  If you want just a grouping of values for country code you may want to just use Query Service or CJA.

Both query the Data Lake, but audiences as you may have discovered are based on Profile.  But in your case, a single attribute, it doesn't make any difference if the attribute is stored in one dataset.

Your SQL for QS should look something like:

SELECT countryCode, COUNT(1) from dataset group by countryCode