Forum Discussion

Andy6001's avatar
Andy6001
Frequent Visitor
7 years ago

Renewal rates

Hi,

I'm trying to work out customer renewal rates, but the way in which our records are stored is making this tricky with Power BI.

 

Each customer has a unique User ID, but some customers will have more than one Card ID (i.e. they have renewed). Each card also has a card status. Therefore, I'm trying to identify all users who have had an expired card (card status 10) and now have a new card (card status 6). The problem is that each card is stored on a seperate row. The following is an approximation of what I'm looking at:

 

User IDCard IDCardstatusPurchase DateExpiry Date
112341001/05/201830/04/2019
15678601/05/201930/04/2020


On the face of it looks like it should be simple but I've spent weeks trying to do it and nothing works.

Here's what I've tried:

 

1. CALCULATE(COUNTAX(CardTable, [User ID]), FILTER(CardTable, [Cardstatus]=10&&[Cardstatus]=7))

(I've tried many different methods of achieving similar)

 

2. Creating a new table where count of User Ids is more than 1, but that doesn't seem to work properly and the format of the 1's returned by an IF statement are text rather than a number.

 

3. Counting user id's where there is [time purchased]>[Expiry Date]

 

I cannot get any of these to work. I don't know if my method is flawed, or my DAX, or both, but I'm tearing my hair out with it. Any suggestions would be gratefully received.

Thanks,

Andy

9 Replies

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

    Andy6001 

     

    What is your desired form of result?

     

    I mean do you  need

    the Count of those users,

    or

    Names of those users

    Do you need it in a Table or a MEASURE?

    If you need MEASURES, try these

     

    Count_Of_Users =
    COUNTROWS (
        FILTER (
            VALUES ( CardTable[User ID] ),
            CALCULATE ( DISTINCTCOUNT ( CardTable[Card ID] ) ) > 1
        )
    )
    
    Names_of_users =
    CONCATENATEX (
        FILTER (
            VALUES ( CardTable[User ID] ),
            CALCULATE ( DISTINCTCOUNT ( CardTable[Cardstatus] ) ) > 1
        ),
        [User ID],
        UNICHAR ( 10 )
    )
    

     

    • Andy6001's avatar
      Andy6001
      Frequent Visitor

      Thank you for your reply,

       

      I'm try to get an output that looks like so:

      Month% of cards renewed
      Jan-1940%
      Feb-1938%
      Mar-1937%

       

      I think the way to go is to create a table of all of the [user IDs] who have had a card during a specific period, say Jan-18 (which means that their cards would expire Jan-19) and then review that list of user IDs to see which ones now have a new card (with a status of 6) from Jan-19 onwards. 

       

      In short, what percentage of people who originally bought a card in Jan-18 have since renewed. 

      I tried the following to give me a table of cards with a particular puchase date but I get the error

       

      "A table of multiple values was supplied where a single value was expected." back.

       

       

      Table = 
      ADDCOLUMNS(
        
              Cards, 
              "Expired Cards", 
              DATESBETWEEN(Cards[timePurchased].[Date], DATE(2014,1,1), DATE(2014,1,31)))

       

       

       

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

        HI Andy6001 

         

        This looks very much doable.

         

        Please copy paste some sample data (Copiable format) and  expected results from that sample data.  
        This way contributors can attempt a solution and match their results. 

         

    • vbisen's avatar
      vbisen
      Frequent Visitor

      Hi
      you can create new measure in the same table (CardTable) 

       

      Measure_Name = DISTINCTCOUNT(CardTable[CardStatus])
       
      then 
      Add Filter for Measure_Name > 1 in your list/table having User ID as single column.. you will get all user ID who have more than 1 record in your table
       
      let me know if that's what you wanted