Use the following measure
UniqueCustomers =
VAR t1 =
ADDCOLUMNS (
orders,
"Rank", RANKX (
FILTER ( ALL ( Orders ), [CustomerID] = EARLIER ( Orders[CustomerID] ) ),
[Order Date],
,
ASC,
DENSE
)
)
RETURN
CALCULATE ( DISTINCTCOUNT ( Orders[CustomerID] ), FILTER ( t1, [Rank] = 1 ) )
Are you willing to learn power bi? Check the Power BI Developer blog from Intellipaat
Check the following youtube link: