I need to detect the number of customers who make purchases in the 2 stores with a single formula
CodePudding user response:
Create this below measure-
person_count =
var total_shop_count = DISTINCTCOUNT(your_table_name[Shop])
var tab =
SUMMARIZE(
your_table_name,
your_table_name[Name],
"shop_count",DISTINCTCOUNT(your_table_name[Shop])
)
return
COUNTROWS(
FILTER(
tab,
[shop_count] = total_shop_count
)
)
Here is the output-