Skip to main content

Hi, 

I have a metric with 3 dimensions: Quarter, Products & Employee. 

I also have a transaction list with the following info

  1. Sale XYZ  - in Q1 24  (dimension Quarter) - Productclass A - sold by John (dimension employee) - previous product seller is Anna (dimension employee)
  1. Sale FMG - in Q1 24 - Productclass A - sold by Maria - previous product seller is John

    In my metric with dimension quarter, product, employee I am calling in all product sales, but I assign them to the previous product owner

    so something like iby: -> sale.product.previousseller]. However, in this way all sales get assigned to the last previous seller, whereas I want to assign the sale from John → Ann and the sale from Maria → John because they were at that point in time the previous seller. 

    How can I do this? 

    Thank you very much in advance
     

Hi @Olivia Van Gerven ,

If I understand correctly you have a transaction list Sales designed like this : 

Quantity

Quarter Product SoldBy PreviousSeller
100

Q1 24

Class A John Anna
200 Q1 24 Class A Maria John

 

Can you try this formula in your metric ?

Sales.Quantity iBY: Sales.Quarter, Sales.Product, Sales.PreviousSeller]

You will end up with a metric by Quarter/Product/Employee with the following intersections :

Quarter Product Employee Value
Q1 24 Class A Anna 100
Q1 24 Class A John 200

 

However, if PreviousSeller is a property of the Employee dimension, meaning all products sold by John have Anna as previous Seller, you can do :

Sales.Quantity uBY: Sales.Quarter, Sales.Product, Sales.SoldBy.PreviousSeller]

I don’t think you will need to use the BY → modifier in your case.

Let me know if that helped.


Reply