Forum Discussion
Anonymous
6 years agoNot applicable
Calculating a mean/average based on a measure
Hello guys, I have the following measure which counts the number of occurrences of product IDs within a column. Occurrence = COUNT('Table'[Product ID]) Since I would like to find out how oft...
Anonymous
6 years agoNot applicable
Hi Anonymous ,
According to my understanding, you want to calculate frequency of each ProductID based on a measure—“Occurrence”, right?
You could use the following formula:
Occurrence =
CALCULATE (
COUNT ( 'Table'[ProductID] ),
ALLEXCEPT ( 'Table', 'Table'[ProductID] )
)AVG =
[Occurrence] / CALCULATE ( COUNTROWS ( 'Table' ), ALL ( 'Table' ) )My visualization looks like this:
Is the result what you want? If you have any questions, please upload some data samples and expected output.
Please do mask sensitive data before uploading.
Best Regards,
Eyelyn Qin