Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Audio quality timeseries

Hi,

i want to have a graph depicting audio quality over time. I can do this for 1 hour intervals as an example. But the query then only returns streams that started and ended within that interval, which leaves out a significant number. 

Is there a way to do this?

 

thanks,

Fred

  • Yes, I used this myself to record/analyse phonerecords. If for example you add a column with a sound quality score this score would be added to every row. You can then easily aggregate per minute what the average/max/min sound quality was per minute over all the streams that where active in that specific minute. 

     

    I also experimented with this in seconds. That's also possible with a little code adjustment, but this will generate a huge amount of rows. 

     

    Hope you get to a workable solution!

6 Replies

  • You can create a snapshot type table in PowerQuery. The prequisite for this is that you have a column with and start datetime and a column with an end datetime.

     

    If you have the two columns you can add rows for each second, minute, hour every stream lasts. Be carefull because if you chose second you will add a lot of rows to your table!

     

    First create a column calculating the minutes between the starttime and the endtime. Format this column as a whole number.

    Then adjust this M-code to your specific needs

     

    #"New Column" = Table.AddColumn(#"Name of your previous Step", "NewColumnName", each List.DateTimes([Starttime], Duration.Hours([Endtime] - [Starttime]) + [minutes_between] , #duration(0,0,1,0)))

     

     

    Name of your previous Step = Replace this with the previous step name in the Advanced editor

    NewColumnName = The name for the new column. Adjust this to your own desire

    Starttime = column with the starting datetime

    Endtime = column with the enddatetime

    minutes_between = the calculated column with the amount of minutes between the times.

     

    This will give you a new column containing a list.

     

     

    When you expand the list it will create new rows for every minute the stream was active. You've just created a snapshot table in PowerQuery.

     

    Hope this helps. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    thanks a lot Chiel. THis looks very useful. M-code is new to me and i have to adapt this for CQD. I will report back. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    I thought a bit more about this and now. So if i understand this correctly, this technique would allow me generate new rows/records from a large time interval to smaller ones so that i could then aggregate the measurements for all rows active in a minute interval and by doing so create averages per interval for any measurements that are recorded in the original -before adding new - rows/records. This should work if in the original list i have all streams or calls, with call quality. I will try this. 

    • ChielFaber's avatar
      ChielFaber
      Super User

      Yes, I used this myself to record/analyse phonerecords. If for example you add a column with a sound quality score this score would be added to every row. You can then easily aggregate per minute what the average/max/min sound quality was per minute over all the streams that where active in that specific minute. 

       

      I also experimented with this in seconds. That's also possible with a little code adjustment, but this will generate a huge amount of rows. 

       

      Hope you get to a workable solution!

      • Anonymous's avatar
        Anonymous
        Not applicable

        Grateful for your effort Chiel, great solution!