Forum Discussion
JackEnviro
Helper I
8 years agoNew Customers with order over a certain value - shopify data
Hello I am using Shopify data and I would like to perform some analysis to identify new customer sales to understand the ROI on our keyword marketing spend. The Shopify data shows repeated...
- 8 years ago
Hi JackEnviro,
The formula below assumes that Created Date is column is when an order was created so any row that matches the earliest created date by customer and where Full Order = Full is the New Order.
New Order? = VAR FirstOrderDate = CALCULATE ( MIN ( ShopifyValues[Created Date ] ), ALLEXCEPT ( ShopifyValues, ShopifyValues[Customer ID] ), ShopifyValues[Customer ID] = EARLIER ( ShopifyValues[Customer ID] ) ) RETURN IF ( ShopifyValues[Full Order] = "Part", "N/A", IF ( FirstOrderDate = ShopifyValues[Created Date ] && ShopifyValues[Full Order] = "Full", "New", "Return" ) )
danextian
Super User
8 years agoHi JackEnviro,
The formula below assumes that Created Date is column is when an order was created so any row that matches the earliest created date by customer and where Full Order = Full is the New Order.
New Order? =
VAR FirstOrderDate =
CALCULATE (
MIN ( ShopifyValues[Created Date ] ),
ALLEXCEPT ( ShopifyValues, ShopifyValues[Customer ID] ),
ShopifyValues[Customer ID] = EARLIER ( ShopifyValues[Customer ID] )
)
RETURN
IF (
ShopifyValues[Full Order] = "Part",
"N/A",
IF (
FirstOrderDate = ShopifyValues[Created Date ]
&& ShopifyValues[Full Order] = "Full",
"New",
"Return"
)
)JackEnviro
Helper I
8 years agoThats great - thanks very much for your help!