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.

Create a measure with DIVIDE

Create a measure with DIVIDE - Power BI Tutorial

From the course: Power BI Data Modeling with DAX

Start my 1-month free trial

Create a measure with DIVIDE

- [Instructor] We're working with the third version of the Contoso Sales Sample for Power BI Desktop that we saved in a prior movie. It's also available in the exercise files. And what I'd like to do now that we've calculated gross profit and the sales amount is I'd like to calculate the gross profit percent. In other words, of the sales amount, how much of it profit. This is a division problem. We're going to take gross profit and we're going to divide it into the sales amount. Now it's unlikely in this circumstance that we would have a sales amount that was zero but it's not totally impossible. It might be that we gave a discount that was equal to the entire amount of the sales because we were donating this to a charitable cause. Any time that we could be dividing by a value that could be zero, we have the same problem in Power BI that we have in Excel. We have basically a division zero or DIV/0 error. In Excel, we…

Contents