Microsoft Power BI Cookbook
上QQ阅读APP看书,第一时间看更新

Bike only customers

  1. Create a measure to compute the customers who've only make a bike purchase (not clothing or accessories)
Count of Bike Only Customers = 
VAR BikeCustomers =
SUMMARIZE(CALCULATETABLE('Internet Sales','Product'[Product Category] = "Bikes"),
Customer[Customer Alternate Key])
VAR ClothesAndAccessoryCustomers =
SUMMARIZE(CALCULATETABLE('Internet Sales',
'Product'[Product Category] IN {"Accessories","Clothing"}), Customer[Customer Alternate Key])
RETURN
CALCULATE(DISTINCTCOUNT(Customer[Customer Alternate Key]),
EXCEPT(BikeCustomers,ClothesAndAccessoryCustomers))
  • The syntax aligns with the structure of the first measure except for the use of the IN DAX operator to include accessories and clothing in the same group of customer keys. 
Given the power of these measures they could be candidates for sales and marketing dashboards and exception reports. For example sales teams could focus on cross-selling bike only customers and selling bikes to non-bike customers.