Calculate cardinality of all fields on specific measure and bucket

Hi
Need to calculate cardinality of all fields on specific measure/bucket.

Any idea?
Thanks

Hello @Indeed_1,
You could use the following