Cards can be challenging, because unlike tables, matrixes or charts, they don’t provide any inherent evaluation context. Thus, in situations like this you need to build the proper evaluation context into your measure in the form of a virtual table against which your measure can be evaluated.
This post explains the issue in depth with an example. The same approach should be directly applicable to your problem.
I hope this is helpful. If you need additional specific guidance, please post your PBIX and I’ll be happy to work through it with you.
– Brian