From the course: Excel Business Intelligence: Power Pivot and DAX

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Logical Functions (IF, AND, and OR)

Logical Functions (IF, AND, and OR)

- All right. Next up we are moving on to basic logical functions. So, these are your IF, AND, OR operators, your IFERROR. And these are gonna look very, very similar to how they look in Excel. And we're gonna shift gears a little bit. Up to this point, we've been using measures because we've been using statistical and math functions that return individual values, so they don't really make sense as calculated columns. On the other hand, logical functions like these make a lot more sense as calculated columns. So, we're gonna shift gears, we're gonna add these fields in the data model, and we're gonna write them almost exactly how we would write them in a normal Excel cell. So, first off, IF. It checks if a given condition is met and returns one value if true, another if false. So, this is exactly the same syntax as a normal cell function. So, IF, start with your logical test. That could be something as simple as checking if a column is less than, greater than, equal to a certain…

Contents