Expand my Community achievements bar.

SOLVED

Creatin a segment with total purchase (SUM)

Avatar

Level 1

Hi,

 

I have an Event schema (Purchase) and need to know who purchase more than 100$ during the last 30 days. Can't really find <SUM> or count, any idea?

 

 

thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@jackb4 : You would have to use Segment's builder Aggregation functions. To create an aggregation function,

 

1. Select an event from the left rail, and insert it into the Events container. For example, select the checkout event.

2. After placing the event within the Events container, select the ellipses icon (…), followed by Aggregate.

3. Aggregation is now added. You can now select the aggregation function, choose what attribute to aggregate.

 

Once Aggreate functions are added, click on ellipses icon mentioned in the below screenshot and you can apply the time rule. Select the time frame of last 30 days and you are all set.

 

AvinashGupta01_0-1668456670649.png

 

 

Hope this helps.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

@jackb4 : You would have to use Segment's builder Aggregation functions. To create an aggregation function,

 

1. Select an event from the left rail, and insert it into the Events container. For example, select the checkout event.

2. After placing the event within the Events container, select the ellipses icon (…), followed by Aggregate.

3. Aggregation is now added. You can now select the aggregation function, choose what attribute to aggregate.

 

Once Aggreate functions are added, click on ellipses icon mentioned in the below screenshot and you can apply the time rule. Select the time frame of last 30 days and you are all set.

 

AvinashGupta01_0-1668456670649.png

 

 

Hope this helps.

Avatar

Level 2

Hi @Avinash_Gupta_ ,

We have the same requirement to add the amounts from the purchase events but for certain SKUs. So I added a where clause for the SKU in addition to the setups you had mentioned.

 

To explain further, we have profiles being batched in. I created an experience event schema/dataset to ingest daily purchases per contact per SKU. I used the Sum function in Audience creation screen, however it doesn't seem to work as expected. i.e., I have two profiles and purchases for these two profiles.

For one profile there are two records for the same SKU that totals more than $1000(individual amounts $1000 & $1500). The other profile has only one record for this SKU with the amount of $1000. However, the aggregate check for <= $1000 pulls both profiles into audience. I am attaching the audience composition screenshot for your reference. Please advice if this had worked for you with diff setup.

 

Thanks

Sharmila