Hi,
I have a table which I use to define a marketing channel based on department, account, and vendor. I want to make sure that I do not have duplicated entries for different marketing channels. Basically, that the same combination of department, account, and vendor does not exist. The trick here is that sometimes, there is no vendor or account defined. All four metrics are dimensioned by “line” and a corresponding dimension (line, department / line, account).
I was thinking of creating a text metric (mgkchannel_key), which accumulates the combination of department, account, and vendor, and then counting the unique occurrences for each value. For example, for row 19 and 24, I would see another metric with the value 2, everything else would be a 1. (Then creating a boolean and use conditional formatting to highlight duplications).
How can I count the unique values in a metric? The solution I received below did not work since there is not always a defined vendor or account.

Solution that was suggested already:
