Forum Discussion
Martijn1204
3 years agoFrequent Visitor
Defining new customer
Hi all, I am a bit stuck with a difficult DAX function and I just can't get my head around it so maybe you guys can help me. I want to define new customers and old customers, starting from th...
- 3 years ago
File attached.
v-jialluo-msft
Community Support
3 years agoHi, Martijn1204 ;
Please follow these steps:
(1)This is my test data :
(2) Create a measure to count the new customer
CountNewCustomer =
VAR _old =
SUMMARIZE (
FILTER (
'ClientRevenueProfitByService_v5',
'ClientRevenueProfitByService_v5'[Date] <= EDATE ( TODAY (), -12 )
&& 'ClientRevenueProfitByService_v5'[Sales] <> BLANK ()
),
'ClientRevenueProfitByService_v5'[ClientNameConsolidated]
)
VAR _new =
SUMMARIZE (
FILTER (
'ClientRevenueProfitByService_v5',
'ClientRevenueProfitByService_v5'[Date] > EDATE ( TODAY (), -12 )
),
'ClientRevenueProfitByService_v5'[ClientNameConsolidated]
)
RETURN
COUNTROWS ( EXCEPT ( _new, _old ) )
(3) The result is as follows :
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.