Forum Discussion
Average where not all values are present
- 9 years ago
The problem is that there is no dataline when no ID is present. I solved it by not using the standard average function, but by calculating the average using the DATEDIFF to calculate the number of DATETIMEs in the interval between MIN(DATETIME) and MAX(DATETIME).
Sof what does your data look like when no idea is present?
like so?
DATETIME ID
2015-01-06 15:00:00
you could always create an index column which will present a value for each datetime, in power query add a index column and then do the average on that rather
or you could create a calculated column in dax
if(isblank(id), 0, id)
think the index column might be easiest if you just trying to get a count for each row
you could also do the average of a countrows
what does your measure look like?
The problem is that there is no dataline when no ID is present. I solved it by not using the standard average function, but by calculating the average using the DATEDIFF to calculate the number of DATETIMEs in the interval between MIN(DATETIME) and MAX(DATETIME).