Metrics based on variable value

Yes it is possible!!
you can see a example