The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi All,
Can somone help me to find out the count of customers and the corresponding sales for customers who are members.
1. Returning Members = Unique count of Customers who have "1" in Member Column for this period but also have "1" before the min date in this period if they booked anything in past.
2. New Members = Unique Count of Customers who have "1" in this period but "0" in previous periods. Again they may me returning customers but became members this period.
Customer Email(UniqueID) | Booking Date | Member (1/0) | Booking Amount |
abc | 01/01/1990 | 1 | £ |
abc | 02/01/1990 | 0 | £ |
abc | 03/01/1990 | 1 | £ |
abc | 04/01/1990 | 0 | £ |
I used the queries below for New/ Returning Customers but stuck with the Membership metrics.
NewCustomers = COUNTROWS(FILTER(ADDCOLUMNS(VALUES(AllAdvam[CustomerEmailAddress]),"PreviousSale",CALCULATE(COUNTROWS(AllAdvam),FILTER(ALL(AllAdvam[Booking Date].[Date]),AllAdvam[Booking Date].[Date]<MIN(AllAdvam[Booking Date].[Date])))),[PreviousSale]=0))
Returning Customer = COUNTROWS(FILTER(ADDCOLUMNS(VALUES(AllAdvam[CustomerEmailAddress]),"PreviousSale",CALCULATE(COUNTROWS(AllAdvam),FILTER(ALL(AllAdvam[Booking Date].[Date]),AllAdvam[Booking Date].[Date]<MIN(AllAdvam[Booking Date].[Date])))),[PreviousSale]>0))
May be, I need to add another filter for Members columns to the codes above?
Sam
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.