Forum Discussion
Audio quality timeseries
- 2 years ago
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!
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.