Common pitfalls with Values, Distinct and Value
Another week, another blog! This week, we will cover something very basic. If you are a BI developer and work with Power BI, you will be familiar with DAX functions - Values, Value, and Distinct. This blog will cover all the common pitfalls and practical use cases for each of them. Before we start, let's start with a small question. Are distinct and unique means the same? For a very long time, I used to think they were just synonyms, but they aren't. Wait what?? How are they different? Okay, let's understand it. Distinct means each value in a specific column appeared once. In other words, you can say to count all values as 1. If you are a fan of SQL, then you already know that distinct is used to remove duplicates. While unique means you only consider the values that aren't repeated in a column. There's a subtle difference between the 2 that gets ignored easily. Okay, since you are aware of the difference between distinct and unique, we can now start the real acti...