Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How identify Repeat customers useing dax formula

Hi All,

 

I need your help to identify ( Create calculated column ) Repeat customers based on the previous year's data using the DAX formula. For example, if FY -21 customers exist in FY 20 then they should be marked, Repeat customers. sharing below sample data along with desired output.

 

FYCustomer IdCollection ValueStatus (desired output.)
FY-20CUST-1050205184593 
FY-20CUST-1050588131330 
FY-20CUST-1025818108236 
FY-20CUST-829412128024 
FY-20CUST-1052190150436 
FY-20CUST-1049227139166 
FY-21CUST-1050588101293Repeat customers 
FY-21CUST/726341151588New customers
FY-21CUST/3129337119089New customers
FY-21CUST-582722131873New customers
FY-21CUST-556614190449New customers
FY-21CUST-829412112782Repeat customers 

3 Replies

  • CNENFRNL's avatar
    CNENFRNL
    Icon for Community Champion rankCommunity Champion

     

    Result = 
    IF(
        ISEMPTY(
            FILTER(
                CRM,
                CRM[Customer Id] = EARLIER( CRM[Customer Id] )
                    && CRM[Index] < EARLIER( CRM[Index] )
            )
        ),
        "New",
        "Repeat"
    )

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Jihwan_Kim CNENFRNL 

      Both solutions working fine for me. Thanks for great help

       

      Thanks

      Lavdeep