Forum Discussion
Calculate(Count(), Filter()) - A single value cannot be determined
- 2 years ago
It is an issue of context.
As a measure, the formula you have written does not know what to do with the 'Calendar'[Date]'. That is why it suggests SUM, MAX etc.I have been able to solve this usually by using the SELECTEDVALUE() function. In your case it would look like;
FILTER(Won, Won[Date] = SELECTEDVALUE('Calendar'[Date]))
If you wrote your initial formula as a calculated column it would work as written as the row of the table would immediately provide the context for the 'Calendar'[Date] value.
Hope this helps a bit.
It is an issue of context.
As a measure, the formula you have written does not know what to do with the 'Calendar'[Date]'. That is why it suggests SUM, MAX etc.
I have been able to solve this usually by using the SELECTEDVALUE() function. In your case it would look like;
FILTER(Won, Won[Date] = SELECTEDVALUE('Calendar'[Date]))
If you wrote your initial formula as a calculated column it would work as written as the row of the table would immediately provide the context for the 'Calendar'[Date] value.
Hope this helps a bit.
That worked a treat, thanks for that
Everyday's a school day
Cheers
Jim