Forum Discussion

jimbob2285's avatar
jimbob2285
Icon for Advocate IV rankAdvocate IV
2 years ago
Solved

Calculate(Count(), Filter()) - A single value cannot be determined

Hi   I'm hoping that someone cleverer than me can help please, as this is something that I come up against time and time again, and I don't really understand why... I often get the error message "A...
  • jgeddes's avatar
    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(WonWon[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.