Forum Discussion
Measure - Average Reviews for Today
I have a line chart that shows average number of reviews for this past week.
I would like to create a card with a measure that shows the average number of reviews for today.
I'm getting error on ReviewDate for the measure.
Measure10 = CALCULATE(AVERAGE(ReviewQry[NumOfReviews]), FILTER(ALLSELECTED(ReviewQry[NumOfReviews]), ReviewQry[ReviewDate] = TODAY()))
Edit: Error is "A single value for column 'ReviewDate' in table 'ReviewQry' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.".
Any ideas / suggestions on what went wrong?
Hi Anonymous ,
Because you are using ALLSELECTED(ReviewQry[NumOfReviews]), you cannot directly reference the ReviewQry[ReviewDate] column. Please modify the measure.
Measure10 = CALCULATE ( AVERAGE ( ReviewQry[NumOfReviews] ), ReviewQry[ReviewDate] = TODAY () )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- v-kkf-msft
Community Support
Hi Anonymous ,
Because you are using ALLSELECTED(ReviewQry[NumOfReviews]), you cannot directly reference the ReviewQry[ReviewDate] column. Please modify the measure.
Measure10 = CALCULATE ( AVERAGE ( ReviewQry[NumOfReviews] ), ReviewQry[ReviewDate] = TODAY () )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - JGroothedde
Resolver II
Hi!
Are you certain ReviewDate is actually a date format? You can check this by checking the datatype in Power Query.Cheers.
- AnonymousNot applicable
Yes it is - 5/10/2022 8:09:59 AM is an example of the format.