From the course: Advanced Power BI: DAX Language, Formulas, and Calculations

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

IF DAX function for conditional formulas

IF DAX function for conditional formulas

- [Instructor] The IF tags function lets us write conditional formulas much like we do in other languages and applications, including Excel. There are three parameters in the IF function. The first is the condition we're testing for. The second is the result the formula returns if the condition in the first parameter is true. The third and last optional parameter is the alternative result the formula returns if the condition in the same first parameter is not true. It's important to note that when we're creating DAX measures using the IF function the condition and the results must match the type of DAX formula we're creating. For example, if we're creating a measure, the condition must reference a measure and both the result and alternative result must be DAX measures as well. In Power BI, let's set up a conditional measure to determine the selected loan duration in conjunction with the selected value function. But…

Contents