Welcome to the forum – great to have you here!
In general, you’ll get the fastest, most specific solutions in response if you post your PBIX and a mockup of the result you are trying to achieve.
If your data are confidential/sensitive, here’s a short video on simple strategies for masking sensitive data to enable posting on the forum.
Developing measures for card visuals is interesting, because there is no evaluation context like you would have in a table or matrix, so you frequently have to develop that context via virtual tables within your measure. Here’s a thread discussing a problem similar to yours, with a solution that I think you may find relevant to your situation.
If this doesn’t resolve your issue, please just post your PBIX and I’ll be glad to work through a more specific solution with you.
I hope this is helpful
- Brian