lundi 6 mai 2019

Tableau check for multiple IDs across 2 groups

i want to create a set in tableau, which will show either one of these two values: Y or N

2 already existing columns are here important, "VAT-ID" and "CUSTOMER-ID". the new column should check if a customer-ID has multiple VAT-IDs. If yes, the value "Y" should be displayed, else "N". for example, the first 5 rows of the customer-id column are: 123456

654321

666666

123456

654321 the first 5 rows of the VAT-id column are: EE999999999

AA999999999

GG999999999

KK999999999

AA999999999

the first 5 rows of the new column should be then: Y

N

N

Y

N

any Help would be appreciated, i tried IF [CustomerID] = 1 AND Count([VAT-ID]) > 1 THEN 'Y' ELSE 'N' END which didnt work.

Aucun commentaire:

Enregistrer un commentaire