From the course: Complete Guide to Power BI for Data Analysts by Microsoft Press

Unlock this course with a free trial

Join today to access over 23,200 courses taught by industry experts.

Use logical expressions in DAX

Use logical expressions in DAX

- [Instructor] Okay, in this sub lesson, we're going to discuss the use of logical expressions inside of DAX. And as you begin to write more complex DAX expressions, you'll inevitably find yourself needing to understand and use logical expressions. So let's go ahead. I'm going to go over to my table view and we're going to create a few logical expressions inside of our Customer table. So I'm going to open up the Customer table and what I'm going to do is I first want to go ahead and create a new column. And what I'm going to do is apply a business rule here. So I'm just going to make that a little bit bigger. Once again reminding us that we're creating a column. I'm just going to go in here and paste this code in. And what this is saying is let's create a new column called Primary Buyer. And what we're going to do is if the Cars Owned equals zero on that row, keeping in mind we're looking at the row context, and the Customer Home Owner is No. So both of these values are true. So Cars…

Contents