Forum Discussion
spud
8 years agoRegular Visitor
first product ordered
I would like your help:
short hypothetical example
a vendor sells the following items:
cherries code 283
apples code 282
oranges code 111
A customer orders cherries and apples all of the time
Suddenly the customer orders oranges- how could you set something up to find if a customer ordered a new item such as oranges
1 Reply
- parry2kSuper User
spud I assumed there is order date in the data, add following column to identify when product was ordered first time.
Is this first order = VAR __itemsOrders = CALCULATETABLE( VALUES( Table3[Product] ), FILTER( ALL( Table3 ), Table3[OrderDate] < EARLIER( Table3[OrderDate] ) ) ) RETURN IF( NOT Table3[Product] IN __itemsOrders, "Yes" )