Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 217137

Adding conditional unique index column based on several criterias

$
0
0

The challenge is the need for having a column listing an existing unique ID or create new unique ID based on the following criteria:

 

- If the customer no is recognized, then use the existing unique ID , that is previously tied up to this number

- If the customer no is not recognized, then look up the email , and if this email is recognized, then use the unique ID that is previously tied up to this number.

- If neither the customer no , nor email matches previous records, then lookup phone AND name . If they match, then use existing unique ID , otherways create new unique ID .

 

The condtional column with the unique ID can either be added in the existingtable, which is a XML file that will be updated occassionally( loaded into Power BI. All columns are expanded). Or, the unique ID can be created in a new, separate table. I have lowercased names and emails in separate columns to ensure match.

 

The purpose is to always have a column or table with unique index numbers tied to a customer name, so that statistics are based on unique clients.

 

Is this possible, and if yes, what language would be the best option to use - M or DAX?

 

Any kind of concrete suggestion is highly appreciated as I have been searching in vain for anything that matches this.

 

Thanks a lot in advance. Marianne


Viewing all articles
Browse latest Browse all 217137

Trending Articles