Forum Discussion

ayoubb's avatar
ayoubb
Icon for Helper IV rankHelper IV
6 years ago
Solved

calls ring less than 1min

Please i want to calculate how many calls ring less than 1min

 

6 Replies

  • @ayoubb, Try a new column as a

    nueva columna: if([ring duration] <time(0,1,0),1,0)

    • ayoubb's avatar
      ayoubb
      Icon for Helper IV rankHelper IV

      IS THIS DAX CORRECT:

       

      Calls less 1>MIN = CALCULATE(COUNT(BENZ[False attempt?]), 'BENZ'[False attempt?] IN {"NO"},"BENZ"[Ring duration]<time(0,1,0),1,0)
      • v-xicai's avatar
        v-xicai
        Icon for Community Support rankCommunity Support

        Hi ayoubb ,

         

        You may change your formula like DAX below.

         

        Calls less 1>MIN =
        CALCULATE (
            COUNT ( 'BENZ'[False attempt?] ),
            FILTER (
                'BENZ',
                'BENZ'[False attempt?] = "NO"
                    && 'BENZ'[Ring duration] < TIME ( 0, 1, 0 )
            )
        )
        

        Best Regards,

        Amy 

         

        Community Support Team _ Amy

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • I would likely add a column (using Power Query) which has the duration in seconds (e.g. 132 instead of 00:02:12), that would make it more trivial, but you can work with the current column as well, if the datatype is set to "duration":

    CountLessThan1Minute = 
    CALCULATE ( 
        COUNTROWS ( Data ),
        Data[Duration] < TIME ( 0, 1, 0)
    )

     

  • Hi ayoubb,

     

    Create a calculated column that will act as flag for identifying if time is under 1 minute and then take a count of this new calculated column with filter on flag.

     

    Achieve the below:

     

    In the above:

    1. Make sure your Ring duration column is having 'Time' datatype

    2. Ring_Time_Flag = Calculated column to identify if duration is less than 1 minute; If duration < 1 minute, then flag=1, else flag=0

    3. Take the count of column created in step 2 and Filter on flag = 1 to get desired count

     

    Give a thumbs up if this post helped you in any way and mark this post as solution if it solved your query  !!!

  • v-xicai's avatar
    v-xicai
    Icon for Community Support rankCommunity Support

    Hi ayoubb   ,

     

    Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

     

    Best regards

    Amy