Forum Discussion
Identifying New Customer Sales
- 8 months ago
hey Amik_singh revert with more information if below suggested measure doesn't help. Sentence After -- is a comment for better context.
New Customer Sales =
VAR CurrentCustomers = VALUES('Sales'[CustomerID])
VAR EndDate = MAX('Date'[Date])-- Find customers whose first purchase date falls within the currently selected period
VAR NewCustomers = FILTER(CurrentCustomers,
VAR FirstPurchaseDate =
CALCULATE( MIN('Sales'[OrderDate]),
ALL('Sales') -- Look at their entire history
)
RETURN
-- Check if their first purchase happened in the visible date range
FirstPurchaseDate IN VALUES('Date'[Date])
)RETURN
CALCULATE([Total Sales], KEEPFILTERS(NewCustomers))
hey Amik_singh revert with more information if below suggested measure doesn't help. Sentence After -- is a comment for better context.
New Customer Sales =
VAR CurrentCustomers = VALUES('Sales'[CustomerID])
VAR EndDate = MAX('Date'[Date])
-- Find customers whose first purchase date falls within the currently selected period
VAR NewCustomers = FILTER(CurrentCustomers,
VAR FirstPurchaseDate =
CALCULATE( MIN('Sales'[OrderDate]),
ALL('Sales') -- Look at their entire history
)
RETURN
-- Check if their first purchase happened in the visible date range
FirstPurchaseDate IN VALUES('Date'[Date])
)
RETURN
CALCULATE([Total Sales], KEEPFILTERS(NewCustomers))