I have a table that have ID, date, type of injuries. I am trying to Find the percentage of each affected body part with the ability to filter the year. I used the following Measures:
INJURIES COUNT =
IF(
ISBLANK ( COUNT( 'Injuries'[ID] ) ),
0,
COUNT( ( 'Injuries'[ID]) )
)
Injuries percentage =
DIVIDE(
Injuries[INJURIES COUNT],
CALCULATE(
Injuries[INJURIES COUNT],
ALLSELECTED()
)
,0
)
When I show the data in a table it works just fine even when I filter the year:

When I try to use it in a card visual it only show me 100% even if I filtered the body part and the year:

How can I fix it? I tried many different solutions but nothing worked.