Meet CALCULATE
Part of the DAX with CALCULATE section of Coddy's Power BI journey. Lesson 1 of 24.
CALCULATE runs an expression under filters you add.
Coffee Revenue = CALCULATE([Revenue], Products[Category] = "Coffee")First the expression, then the filters. Each bar keeps its own filters and gets yours too.
Text in double quotes, numbers without: Dates[Year] = 2025. Any comparison works: Sales[Quantity] >= 3.
Challenge
EasyHow much coffee does each shop sell? Write Coffee Revenue: Revenue with the filter Products[Category] = "Coffee". It is checked for each store.
Try it yourself
Coffee Revenue =| Store | Coffee Revenue |
|---|---|
| Lisbon Riverside | |
| Porto Ribeira | |
| Madrid Centro | |
| Barcelona Gracia | |
| Berlin Mitte | |
| Total |
- Sales
- Revenue
- Total Units
- Customers
- Products
- Stores
- StoreID
- Store
- City
- Country
- OpenDate
- Customers
- Dates
- Targets
All lessons in DAX with CALCULATE
1Changing the Filters
Meet CALCULATEA Filter Replaces a FilterSeveral Filters at OnceKeeping FiltersRecap - Member Drink Sales