Introduction to DAX in Power BI
Jess Ahmet
Content Developer, DataCamp
SUM() SUM(),AVERAGE(), COUNT()TODAY(), MONTH(), YEAR()IF(), AND(), OR()CONCATENATE(), UPPER(), LEFT()SUM()SUM(<column>)<column>SUM(Sales)LEFT()LEFT(<text>, <num_chars>)<text>,<num_chars> LEFT('DataCamp', 4) = "Data"Price_w_tax = Price + (Price * Tax) | Item | Price | Tax |
|---|---|---|
| A | $ 20 | 25% |
| B | $ 45 | 0% |
| C | $ 100 | 15% |
Price_w_tax = Price + (Price * Tax) | Item | Price | Tax | Price_w_tax |
|---|---|---|---|
| A | $ 20 | 25% | $25 |
| B | $ 45 | 0% | $45 |
| C | $ 100 | 15% | $115 |
| Item | Price | Tax | Price_w_tax |
|---|---|---|---|
| A | $ 20 | 25% | $25 |
| B | $ 45 | 0% | $45 |
| C | $ 100 | 15% | $115 |
Total_price_w_tax = SUM(Price_w_tax)Total_price_w_tax = $25 + $45 + $115 = $185| Item | Price | Tax | Price_w_tax |
|---|---|---|---|
| A | $ 20 | 25% | $25 |
| B | $ 45 | 0% | $45 |
| C | $ 100 | 15% | $115 |
Total_price_w_tax = SUM(Price_w_tax)| Item | Price | Tax | Price_w_tax |
|---|---|---|---|
| A | $ 20 | 25% | $25 |
| B | $ 45 | 0% | $45 |
| C | $ 100 | 15% | $115 |
Calculated at query time as you interact and filter
Total_price_w_tax = SUM(Price_w_tax)

Introduction to DAX in Power BI