I am not sure you can do it the way you want. You probably need to use “Group by” and create new expressions to use in value and label.
check this topic: