Expand my Community achievements bar.

Applications for the 2024-2025 Adobe Analytics Champion Program are open!

How to count products dimension?

Avatar

Level 2

Let there be a case that, there are 10 orders today. Each order contains 2 products (A+B). Now I want to count how many products are sold today, how can I get the result?

Obviously the expected answer will be 20. But if I use the metric 'Order (Purchase Event)', it returns 10. And if I use the function 'Approximate Count Distinct (dimension)', it returns the count of a strange product bundle, which contains products not sold today(C) and changes among dates (ABCDE yesterday & ABCFG today).

Can someone tell me the right way, thanks.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Community Advisor

Hi @KiriHong,

 

While you think this would be available by default (it's not), you pass a quantity value into your order... while Adobe uses this to calculate the revenue - i.e. Price (5.00) * Quantity (3) = $15 Revenue

 

You would think that you could leverage the Quantity to attain the number of items / products. However, maybe you don't care if it's 1 or 5 of the same product, you just care that the order had 2 unique products.

 

What I have found is using a numeric merchandising event is the best option.

 

You could set up one for "unique products", as well as replicate the total quantity of items.

 

There is nothing wrong setting up both options, so for example:

event1 = Total products purchased

event2 = Unique products purchased

 

 

s.event = "event1,event2";
s.products = "Example category;Example product;1;3.50;event1=1|event2=1;eVar1=Example merchandising value 1|eVar2=Example merchandising value 2,Example category 2;Example product 2;3;5.00;event1=2|event2=1;eVar1=Example merchandising value 2|eVar2=Example merchandising value 2";

 

 

 

So if you were to pull this into your Workspace:

    Event 1 - Total Event 2 - Unique Orders
    3 2 1
Products   3 2 1
  Example product 1 1 1 1
  Example product 2 2 1 1

 

 

I hope this helps.