Forum Discussion
Top 3 Customers by unique ID
I have two tables, one has the company name and the other has the sales. the problem is the company name is repeted because of spelling differences.
what I am trying to do is show the top 3 companies by sales but the duplication is getting in the way.
here is what the data looks like and what I am trying to achieve:
-how do I get around this duplication? Thank you!!
Company T Sales T GOAL
ID Company ID Sales Company Sales
1 Walmart 1 10,000 safeway 15,000
1 Wal-mart 1 10,000 Winco 12,000
2 target 2 3,000 Walmart 10,000
3 safe-way 3 15,000
3 safeway 3 15,000
4 Kroger 4 5,000
5 Winco 5 12,000
5 Win-co 5 12,000
3 Replies
- jstorm
Resolver III
In the 'Transform Data' window, use the 'Replace Values' action to replace 'Wal-mart' with 'Walmart' and 'Safe-way' with 'Safeway'. Essentially, you just need to clean up your data a bit. When you add new data and refresh the data set, these 'Replaced Values' steps will still be in effect.
- AnonymousNot applicable
jstorm there are too many duplications to do by hand. I would guess 10,000 different companies with dups
- jstorm
Resolver III
Okay, you can create a second table to act as a lookup then. Duplicate the table that contains your varying company names, then remove duplicates on the 'ID' column. Next, make a relationship between the new and original tables on 'ID'. Finally, use the 'Company Name' Column from the new lookup table in your visualization.
Let me know if this works.