As Anjan said, this is not supported by standard NAV. You can use flowfilters with locations you want to see inventory, but this is not what you want. I don't know what you want to use quantity on hand. If you want to use for planning, this is a problem. You can make customization, but this is not so easy. You can use SKU as idea, but you need some customization again.
The best way I think without customization is using Assembly Orderd feature. You can consume damaged item and make 'new' damaged item with new code, and afterthat you can place them on other ('Damaged') location. When you look quantity on hand, you will see separately correctly and damaged items inventory.
This is an idea...