Forum Discussion
Get unique intervals from a column
- 4 years ago
Create a table where all the intervals are expanded into minutes throughout the day. Here's what such a table should look like:
EmployeeId | CallId | Date | MinuteId
----------------------------------------
Once you've got this, it's easy to calculate unique time. You can add as many attributes to the table as you need to track all necessary details. Your DAX for calculating the number of unique minutes will then be:
[# Minutes] = distinctcount( T[MinuteId] )
How easy is that, huh? Bear in mind, please, that MinuteId should be unique across all days. If you make it unique only throughout a day, you'll have a much harder time to calculate. I would suggest that you just number all the minutes consecutively starting from the beginning of your time.
Create a table where all the intervals are expanded into minutes throughout the day. Here's what such a table should look like:
EmployeeId | CallId | Date | MinuteId
----------------------------------------
Once you've got this, it's easy to calculate unique time. You can add as many attributes to the table as you need to track all necessary details. Your DAX for calculating the number of unique minutes will then be:
[# Minutes] = distinctcount( T[MinuteId] )
How easy is that, huh? Bear in mind, please, that MinuteId should be unique across all days. If you make it unique only throughout a day, you'll have a much harder time to calculate. I would suggest that you just number all the minutes consecutively starting from the beginning of your time.