Forum Discussion
Anonymous
4 years agoNot applicable
Need help with Measure
Hello Community - The measure below works perfectly for what I am using it for...which is to discern the number of "new" customers. This measure gives me a scalar value which essentially subtrac...
v-chenwuz-msft
4 years agoCommunity Support
Hi Anonymous ,
Maybe you can try use Dim_Date table to do the filter, let the range of dim_date between time period you want.
New Bill to customers =
VAR _CustomersThisMonth =
CALCULATETABLE (
VALUES ( SalesOrdersALL[Bill To Customer_CustNum] ),
USERELATIONSHIP ( 'Dim_Date Table'[Date], SalesOrdersALL[Order Date] )
)
VAR _PriorCustomers =
CALCULATETABLE (
VALUES ( SalesOrdersALL[Bill To Customer_CustNum] ),
USERELATIONSHIP ( 'Dim_Date Table'[Date], SalesOrdersALL[Order Date] ),
//
FILTER (
ALL ( 'Dim_Date Table'[Date] ),
[Date] // Time period you want
> MIN ( SalesOrdersALL[Order Date] ) - [Churn Time Frame Value]
&& [Date] < MIN ( SalesOrdersALL[Order Date] )
)
) //
VAR _NewCustomers =
COUNTROWS ( EXCEPT ( _CustomersThisMonth, _PriorCustomers ) )
RETURN
_NewCustomers
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.