Forum Discussion

qs's avatar
qs
Helper I
8 years ago
Solved

DATA[booked_calls]

Hello,  I hope that I can get a bit of help. I have two columns in my DATA table and I'm trying to divide one by the other to give me a percentile output. 

 

It's a simple call booking table. Ideally, I would like to see a percentage column which shows calls divided by booked_call for any given day and/or month.

 

 

Both calls and booked_calls are expressed in dd: mm:yyyy hh: mm: ss.

DATA[calls] is the first column and DATA[booked_calls] is the other. 

 

Thanks for your help in advance. 

  • qs's avatar
    qs
    8 years ago

    Hi Eric,

    Thanks for your message. Since I have date_table, I managed to get the percentages of the "calls" over the "booked_calls" using  the following formula:

    Percentage = DIVIDE([count of calls],[count of booked_calls])*100

     

    Best
    Q

5 Replies

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    qs wrote:

    Hello,  I hope that I can get a bit of help. I have two columns in my DATA table and I'm trying to divide one by the other to give me a percentile output. 

     

    It's a simple call booking table. Ideally, I would like to see a percentage column which shows calls divided by booked_call for any given day and/or month.

     

     

    Both calls and booked_calls are expressed in dd: mm:yyyy hh: mm: ss.

    DATA[calls] is the first column and DATA[booked_calls] is the other. 

     

    Thanks for your help in advance. 


    qs

    It is not quite clear for me. Could you share any sample data and expected output?

    • qs's avatar
      qs
      Helper I

      Using date table. then I would like to see how many calls are made against booked calls in each given month, expressed in percentage

    • qs's avatar
      qs
      Helper I

      In substance, I would like to calculate the ratio of  "Count of calls" over "Count of booked_calls" expressed in percentage for each given month.

      • Eric_Zhang's avatar
        Eric_Zhang
        Microsoft Employee

        qs

        Then you'll have to split those two column into individual tables, convert the selected column to date type.

        booked_calls = SELECTCOLUMNS(yourTable,"booked_call",yourTable[booked_call])
        
        calls = SELECTCOLUMNS(yourTable,"call",yourTable[calls])

        Create a calendar table.

        calendar = CALENDAR("2017-01-01","2017-12-31")

        The create proper relationship

         

        Then just create a measure as

        prec = DIVIDE(COUNT(booked_calls[booked_call]),COUNT(calls[call]))