Show different expression in Legend in a pie chart
I have a data set with four fields - Group, Person, ProductId, Amount. Basically there are two groups, A and B, in each group there are many persons. And each person can control several productId with a certain amount. Now I need to show a pie chart for each group. The pie should show the number of productId controlled by each person, also, in the legend I want to show the total amount for each person.
What I'm doing is, for each group, I create two pie charts, and put one on top of another. In the bottom chart, I show the pie with number of productId and do not show legend in this chart. In the top chart, I show the legend only with amount in the legend. This solution works well for Group A (see below screenshot).
However, for Group B, since all amount values are zero, the top pie chart does not show anything.
So my question is, is there a solution to show the legend still when the amount values are all zero in the top chart?
Or is there an alternative to create a chart like this? The idea is just create show the pie in one expression and show the legend in another expression.