Forum Discussion

michael_knight's avatar
michael_knight
Post Prodigy
4 years ago
Solved

Display which attempt based on dates

Hi All,

 

I'm trying to display which attempt we're on in terms of booking people in for Initial calls. I've inputted a table below of what the expected resuls will be

MembershipCall DateCall TypeAttempt
000110/10/2021Initial1st Attempt
000115/11/2021Initial2nd Attempt
000120/12/2021Initial3rd Attempt
000201/09/2021Initial1st Attempt
000210/11/2021Review 
000309/09/2021Initial1st Attempt
000310/10/2021Initial2nd Attempt
000312/12/2021Review 
000415/08/2021Initial1st Attempt
000526/08/2021Initial1st Attempt

 

It's basically looking to see if there has been any initial calls after the 1st Attempt and then display which numbered attempt it is on

 

I'd like this to be a custom column in the table view so I'd be able to easily filter using a silcer etc

 

Does anyone know how I can do this?

 

Please let me know if you have any questions

 

Thanks,

Mike

  • amitchandak's avatar
    amitchandak
    4 years ago

    michael_knight , I do saw any first call in your result column

     

    I think a new column like 

    Var _1 = Countx(filter(table, [Membership] = earlier([Membership]) && [Call Type] <> "Call Type" && [Call Date] <= earlier([Call Date])), [Call Date])

    return

    if(_1 =1, "1st Call", (_1 -1) &  " Attempt" )

     

3 Replies

  • michael_knight , A new column like below will give you number

    Countx(filter(table, [Membership] = earlier([Membership]) && [Call Type] <> "Call Type" && [Call Date] <= earlier([Call Date])), [Call Date])

     

    You can convert 1 ->1st, 2-> 2nd

    • michael_knight's avatar
      michael_knight
      Post Prodigy

      Hi amitchandak, thanks for the reply. I tested that measure and it looks like it only counts the number of times a call has been attempted to be booked in. I'm looking at going into more details, for example if the call is the 1st call then return 1st Attempt, if it's the 2nd call then display 2nd Attempt and so on

       

      Does that make sense?

      • amitchandak's avatar
        amitchandak
        Super User

        michael_knight , I do saw any first call in your result column

         

        I think a new column like 

        Var _1 = Countx(filter(table, [Membership] = earlier([Membership]) && [Call Type] <> "Call Type" && [Call Date] <= earlier([Call Date])), [Call Date])

        return

        if(_1 =1, "1st Call", (_1 -1) &  " Attempt" )