How to create Single Stat Repeat for only not null metrics

for example there are two template variables

  1. Customer {all, a, b, c} and
  2. Environment : {all, dev, test, uat, prod}.

for customer a environment { dev, test}, for customer b environment {test, uat, prod} and for c environment {prod} are applicable.

row repeat is used for customer
single state panel repeat is used for Environment

When selecting all for customer and Environment variable

current output is :
a
dev , test , null , null
b
null, test, uat, prod
c
null, null, null, prod

where as expected output should be
a
dev
b
test, uat, prod
c
prod

Please suggest what changes are required to bring expected output.