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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Need Help: Count Customers based on filters & Identify New/ Lost Customers

Hi There,

 

I am looking for help to create few measures. My attempts to seek guidance was not fruitful and hence posting here. I have put the datatable below along with expected answer for ease of answering.

 

Below are the 3 questions (more detailed with expected answer in "What measures are needed" tab in attached excel:

 

1. How to calculate the number of customers for whom a certain number of services were rendered?

2. How to identify new customers?

3. How to identify Lost customers?

 

I used this measure but was not able to identify whether it was "Consultancy" or "Implementation" through filters - 

 

One Service Only = SUMX(FILTER(SUMMARIZE(FILTER(DataTable,[Revenue]<>0),DataTable[Customer],"Count of Service",DISTINCTCOUNT(DataTable[Service Rendered])),[Count of Service]=1),1)

 

YearMonthCountryCustomer NameService RenderedDocument noRevenueCash Collected

2015JanUSACustomer 1Consultancy892 $           100 $                     100
2015JanUSACustomer 1Implementation892 $             80 $                       40
2015JanUSACustomer 1Consultancy981 $           240 $                     150
2015JanUSACustomer 2Consultancy989 $           110 $                     100
2015JanUSACustomer 2Implementation1003  $                     100
2015JanUSACustomer 3Implementation1021 $           300 $                     250
2015JanUSACustomer 3Consultancy1021 $           750 $                     500
2015JanUSACustomer 4Consultancy1022 $           180 $                     150
2015FebUSACustomer 1Implementation1055 $           400 $                     340
2015FebUSACustomer 2Implementation1057 $           200 $                     200
2015FebUSACustomer 3Implementation1060 $           600 $                     600
2015FebUSACustomer 5Consultancy1077 $           550 $                     750
2015FebUSACustomer 6Consultancy1087 $             50 $                       75
2015FebUSACustomer 7Consultancy1088  $                       75
2015JanIndiaCustomer 1Consultancy8928080
2015JanIndiaCustomer 1Implementation8926432
2015JanIndiaCustomer 1Consultancy981192120
2015JanIndiaCustomer 2Consultancy9898864
2015JanIndiaCustomer 2Implementation1003 80
2015JanIndiaCustomer 3Implementation1021240200
2015JanIndiaCustomer 3Consultancy1021600400
2015JanIndiaCustomer 4Consultancy1022144120
2015JanIndiaCustomer 4Implementation1022320320
2015FebIndiaCustomer 2Implementation1057 160
2015FebIndiaCustomer 3Implementation1060 480
2015FebIndiaCustomer 5Consultancy1077440600
2015FebIndiaCustomer 6Consultancy10874060
2015FebIndiaCustomer 7Consultancy1088 60

 

 

 

     
  Question:  
 Qn 1In a selected period & Country, how many number of customers in USA & India were provided: 
  # 1Both types of services (i.e., Consultancy & Implementation) 
  Expected Ans:USA in Jan = 2 customer (Customer 1 & 3). Customer 2 had zero revenue on implementation and hence excluded 
     
  # 2Only one type of service (either Consultancy or Implementation) … sum of 3 & 4 below 
  Expected Ans:USA in Feb = 5 customers (Customer 1, 2, 3, 5 & 6). Customer 7 has no revenue and hence excluded 
     
  # 3Only Consultancy Services 
  Expected Ans:USA in Jan = 2 customers (Customer 2 & 4). Customer 2 has zero revenue on Implementation and counted for one type of service count 
     
  # 4Implementation Services 
  Expected Ans:India in Feb = 2 customers (Customer 2 & 3) 
     
  All calculations need to exclude customers who had zero Revenue but had cash collections 
     
 Qn 2In a selected period & country, how many new* customers were made 
  Expected Ans:USA in Feb = 2 customers (Customer 5 & 6). Customer 7 had zero Revenue in Feb and hence excluded 
     
  If a customer was not in the database in any prior month, the customer is identified as new 
  To clarify, a customer for 'consultany' in a prior month is provided 'implementation' services for the first time in the current month is NOT a new customer 
     
 Qn 3In a selected period & country, how many old customers were lost 
  Expected Ans:India in Feb = 3 customers(Customer 1, 2 & 4). Customer 2 is considered as lost customer on account of zero revenue in Feb 
     
  If a customer ceases to have revenue in any month, the customer is identified as Lost in that month 
     

 

Regards

 

Minosh

 

 

 

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

 

I'd like to solve this question in steps.  You may refer to my solution to your first question in this PBI file.  For question 4 (Only Implementation services), why should the answer be 2? - there is no billing for Customers 2 and 3 in India in Feb 2015.  In the matrix, i have also shown Customer names for your additional names.  You should be able to drag any field in/out of the filter/matrix.

 

Let me know how this works.  If there are no mistakes, we will proceed to the next questions.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Hi,

 

Thank you for the feedback.  Could you kinldy help me with data for a few years so i can correct for the error.  If i add fictitious data, i may still not be able to catch the error.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

20 REPLIES 20

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.