Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
qadir
Frequent Visitor

Lost Customers and New Customers based on Months

PBIX file LINK : https://we.tl/t-5x6xgXcWMa

Customers File

NewCustomer (If the customers first date is between (last 2 months) M-2 & M-1

ex : in Mar23, between Jan23 & Feb23

ex : in Feb23, between Dec22 & Jan23

 

 LostCustomers = a customer who did not come in the last month but came at least once in the 12 months before that

ex: in Feb23, a customer who did not come in Jan22 but came at least once between Jan22 & Dec22

ex : in Mar23, a customer who did not come in Feb22 but came at least once between Feb22 & Jan23

 

- ActiveCustomers = a customer who came at least once in the last month AND came at least once in the 12 months before that

ex : in Feb23, a customer who came in Jan22 AND came at least once between Jan22 & Dec22

ex : in Mar23, a customer who came in Feb22 AND came at least once between Feb22 & Jan23

Customers File

 

1 ACCEPTED SOLUTION

The general idea is the  same. Create a list of customers for each of the date ranges you want to compare

 

So for February 2023 you need these lists:

- customers for Dec 2022 and Jan 2023

- customers before Dec 2022

 

Then do the EXCEPT or INTERSECT to arrive at the desired result. See attached.

 

lbendlin_0-1677418698190.png

 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

 

New Customers = 
var a=max('Date Table'[MonthEnding])
var b = summarize('Bourgeolles 4711','Bourgeolles 4711'[CustomerKey])
var c = CALCULATEtable(SUMMARIZE('Bourgeolles 4711',[CustomerKey]),DATESBETWEEN('Date Table'[Date],edate(a,-3)+1,edate(a,-1)))
return countrows(except(b,c))

 

 

and then similar for the other measures.

Hi @lbendlin  thank you so much for the measure, I add measure and it shows new customers within the month (For February 2023 it shows customers with in the month of February 2023). But i want to shows the customers before 2 months (For example for February 2023, the new customers should be sum of customers in January 2023 and December 2022 (172+182 = 354), similarly for  January 2023, the new customers should be the sum of new customers in the month of December 2022 and November 2022 (76+182= 258).

Also I tried to find the active customers and Lost customers by change the edate parameter Interval but it shows the similar results.

 

Screenshot_1.jpg

The general idea is the  same. Create a list of customers for each of the date ranges you want to compare

 

So for February 2023 you need these lists:

- customers for Dec 2022 and Jan 2023

- customers before Dec 2022

 

Then do the EXCEPT or INTERSECT to arrive at the desired result. See attached.

 

lbendlin_0-1677418698190.png

 

 

Hi @lbendlin thank you so much for response, I use this measure and This measure shows the customers whose earlist date is with in the month (for example for february 2023, customers with earlist date february 2023) but i want to present customers before 2 months. For example for the February 2023 New customers should be Sum of New customers in January 2023 and December 2022 (172+182 = 354). Similarly for january 2023, new customers should be sum of new customers in December 2022 and November 2022. So for january 2023 news customers (76+182 = 258).

For lost customers and Active customers I made changes to the edate parameter but it shows the same results.

 

Screenshot_1.jpg

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.