Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Distinct new Clients

Hi Community,

 

I created a measure to calculate distinct new clients as: 

New Cients =
VAR previousclient =
ADDCOLUMNs (
ALL ('Table'[Client_id]),
"ABC", CALCULATE ( MIN ( 'Table'[Service_date]), ALLEXCEPT ( 'Table','Table'[Client_id] ) )
)
VAR NewClients =
FILTER (
previousclient,
CONTAINS ( VALUES ( Datedim[Date] ), Datedim[Date], [ABC] )
)
RETURN
COUNTROWs( NewClients)

 

Then a measure to calculate new clients this month, I am not getting the correct result. Following is snapshot of whats expected:

 

 

Here is my pbi file: https://1drv.ms/u/s!Ag919_pO_UKrgRsvDQaPDqbiFQhz?e=u3TcPo

 

Please suggest. Thanks in advance!

  • Hi,

    The answer 4 is correct.  Client id 119 should not be considered because the first interaction with that client was on June 13, 2021.  I have written my own formula.  Download my PBI file from here.

    Hope this helps.

5 Replies

  • Hi,

    The answer 4 is correct.  Client id 119 should not be considered because the first interaction with that client was on June 13, 2021.  I have written my own formula.  Download my PBI file from here.

    Hope this helps.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Ashish_Mathur thanks a lot, it works! Would you please let me know how to tweak the measure 'New' to get the new clients FYTD and last FY, considering financial year starts on July1 ?

       

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        You are welcome.  If my previous reply helped, please mark that reply as Answer.  For your new requirement, show me the expected result very clearly in the PBI file.  

  • Anonymous , Try measure like these examples  with help from date table ( use correct measure)

     

    Customer this month = calculate([Sales],datesmts('Date'[Date]))
    Customer before = calculate([Sales],filter(all('Date'), 'Date'[Date] < = eomonth(max('Date'[Date]),-1)))
    Lost Customer This Month = Sumx(VALUES(Customer[Customer Id]),if(ISBLANK([Customer this month ]) && not(ISBLANK([Customer before ])) , 1,BLANK()))
    New Customer This Month = sumx(VALUES(Customer[Customer Id]), if(ISBLANK([Customer before ]) && not(ISBLANK([Customer this month ])) ,1,BLANK()))
    Retained Customer This Month = if(not(ISBLANK([Customer this month ])) && not(ISBLANK([Customer before ])) , 1,BLANK())

     

     

     

    refer if needed

     

    Customer Retention Part 1:
    https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529
    Customer Retention Part 2: Period over Period Retention :https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-2-Period-over-Period-Retention/ba-p/1377458

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak thanks for the info, but I am not able use it in context to my dataset and requirements.