

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: DAX
incomplete
2: Logical Functions – IF
incomplete
3: SWITCH Function
incomplete
4: Time Intelligence Functions
incomplete
5: More Time Functions
incomplete
6: Add Columns
incomplete
7: Aggregations
incomplete
8: Aggregations As Measures
incomplete
9: Iterators
incomplete
10: Calculated Columns vs. Measures
incomplete
11: Context in DAX
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Logical functions let your DAX formulas make decisions based on conditions. With them you can label rows, create flags, or change calculations depending on your data.
In the sales dataset, we might want to mark which orders are bulk orders, or whether a sale has a discount applied. Logical functions like IF and SWITCH are perfect for this.
Logical functions turn your numbers into rules the business actually cares about.
You will typically use logical functions in:
The IF function checks a condition and returns one value if true, another if false. Here's an example of an IF function that labels homes as "Jumbo" or "Normal" based on whether their price is above $700,000:
HouseType = IF(Homes[Price] > 700000, "Jumbo", "Normal")
Notice that it has 3 parameters:
Homes[Price] > 700000)"Jumbo")"Normal")and returns the value as HouseType.
Save the project and, from the course directory, submit the CLI tests.