Many times, people use Distinct and Unique interchangeably. However, they are not same. Even after understanding the difference, it was hard to remember the difference. This blog will elaborate on the difference between Distinct & Unique and how to remember this.
Difference between Unique and Distinct
Distinct: All different values in a dataset, regardless of how many times they appear. Each value is counted only once, even if it appears multiple times.
Unique: Values that appear exactly once in the dataset.
Lets understand this with example
Let us say dataset = {1, 2, 2, 3, 4, 4, 4, 5}
So,
Distinct values of above dataset are {1, 2, 3, 4, 5} whereas,
Unique values of above dataset are {1, 3, 5}
How to remember difference between Unique and Distinct
Unique in English is “one of a kind”. Imagine a Unique gemstone that stands Uniquely on its own in a jewelry store, with no duplicates.
Distinct can be remembered as Different (both starting from D) this reminds that distinct values are all the different values in the dataset, counting each only once regardless of repetition (i in Distinct also also appears twice).
Related Posts
C P Gupta is a YouTuber and Blogger. He is expert in Microsoft Word, Excel and PowerPoint. His YouTube channel @pickupbrain is very popular and has crossed 9.9 Million Views.
Pingback: How to Get Distinct Values in Excel 2013 and Above version