From the course: Power BI Data Modeling with DAX

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use IF

Use IF - Power BI Tutorial

From the course: Power BI Data Modeling with DAX

Start my 1-month free trial

Use IF

- [Instructor] Find and the logical function if are two functions that I often will use together. I'm looking for something in an product name, a product description, some other text string that is stored in a column and then based on that, I'd like to do something other than indicate where that string shows up at. So what we're going to do is modify the existing mouse column by wrapping the find statement in an if statement. I'm going to say if, remember that the result of this find will either be zero or something greater than zero. So I'm going to say if the result of this is greater than zero, comma, then if it's greater than zero, we know that the string mouse actually appears. And so I'm simply going to put yes. And if it is zero then, or conceivably smaller, that wouldn't happen in this particular formula, I'm going to say no. So if the result of the find is greater than zero, then yes it's a mouse, if not, no…

Contents