Forum Discussion
Average count from a column using dax
- Anonymous9 years ago
Anonymous wrote:
Thiyagu It seems you have taken average of 'sum' of attachment_id. I just require 'averager count of attachment_id' per file_id
For instance
File_id Attachment_id
1 4
1 3
1 34
2 323
2 33
3 33
3 333
4 23
Now in this case outcome should be: 8 ( unique attachment_id) / 4 (unique file ids) = 2 i.e on an average people add 2 attachments to a file.
Anonymous,
Based on the above sample data, you would need to create a measure using the DAX below.
Measure = DIVIDE(COUNT(Table[Attachment_id]),DISTINCTCOUNT(Table[File_id]))
Regards,
Thiyagu It seems you have taken average of 'sum' of attachment_id. I just require 'averager count of attachment_id' per file_id
For instance
File_id Attachment_id
1 4
1 3
1 34
2 323
2 33
3 33
3 333
4 23
Now in this case outcome should be: 8 ( unique attachment_id) / 4 (unique file ids) = 2 i.e on an average people add 2 attachments to a file.
Anonymous wrote:
Thiyagu It seems you have taken average of 'sum' of attachment_id. I just require 'averager count of attachment_id' per file_id
For instance
File_id Attachment_id
1 4
1 3
1 34
2 323
2 33
3 33
3 333
4 23
Now in this case outcome should be: 8 ( unique attachment_id) / 4 (unique file ids) = 2 i.e on an average people add 2 attachments to a file.
Anonymous,
Based on the above sample data, you would need to create a measure using the DAX below.
Measure = DIVIDE(COUNT(Table[Attachment_id]),DISTINCTCOUNT(Table[File_id]))
Regards,