Deduplicating values in column name with reference to ID column

Hi everyone, thank you for all the help recently!
Similar to my previous doubt, in this one I have an issue regarding duplicates.
image
Here, I have two columns, one is for Corporate ID and the other is for Corporate Name. The corporate ID is unique for each company, however due to human error, certain companies have been entered twice or thrice or more in the dataset with slight differences in their names. While that’s fine, my analysis of the companies creates an issue:


A single company has different orders filed under their name, which means that showing the GMV per corporate becomes an issue. I’m looking to merge all the companies under a single ID. How do I proceed with this? Could this be done using the LAC-A function? Cheers and Merry Christmas everyone!

Hi @rohit_SB,

You can create a new calculated field like this and add it to your visual instead of the Corporate Name field:

ifelse(
	{Corporate ID} = 'some id', 'desired name',
	{Corporate Name}
)

If you’re using sum as your aggregation, the orders for all the duplicates should add up to give you one single number per Corporate ID.

1 Like

If you’re just looking to get the correct total number of orders without merging the names, you can do this:

sumOver({Orders}, [{Corporate ID}], PRE_AGG)
1 Like

Thank you @David_Wong. I’ll update you shortly!

Hi Rohit,

Did Davids suggestion help? I’ll mark it as a solution, please let us know though if you need more assistance on this.

Thank you.

We’re making some changes to our dataset as of now, so I haven’t had the opportunity to work on this. Thank you @David_Wong!