What are the minimum and maximum sales amounts recorded in our sales data?
MIN and MAX in Power BI - Dashboard Guide
| Order ID | Product | Sales Amount | Region |
|---|---|---|---|
| 1001 | Chair | 150 | East |
| 1002 | Desk | 300 | West |
| 1003 | Lamp | 75 | East |
| 1004 | Table | 450 | North |
| 1005 | Shelf | 200 | South |
- KPI Card: Minimum Sales
Measure formula:Min Sales = MIN('Sales'[Sales Amount])
Result: 75 - KPI Card: Maximum Sales
Measure formula:Max Sales = MAX('Sales'[Sales Amount])
Result: 450 - Bar Chart: Sales Amount by Product
X-axis: Product
Y-axis: Sales Amount
Shows sales values for each product - Table: Sales Details
Columns: Order ID, Product, Sales Amount, Region
Shows all sales records
+----------------------+----------------------+ | Min Sales (KPI) | Max Sales (KPI) | | [ 75 ] | [ 450 ] | +----------------------+----------------------+ | Bar Chart: Sales Amount by Product | | (Product on X-axis, Sales Amount on Y-axis) | +-------------------------------------------------------------------+ | Table: Sales Details | +-------------------------------------------------------------------+
Adding a filter for Region will update all components:
- The Min Sales and Max Sales KPI cards will recalculate based on the filtered sales amounts.
- The bar chart will show sales amounts only for products sold in the selected region.
- The sales details table will list only the orders from the selected region.
This helps focus on sales performance in specific regions.
If you add a filter for Region = East, which components update and what are their new values?
- Min Sales KPI: Updates to 75 (Lamp sale)
- Max Sales KPI: Updates to 150 (Chair sale)
- Bar Chart: Shows only Chair and Lamp sales
- Sales Details Table: Shows only orders 1001 and 1003
Practice
What does the MIN function do in Power BI?
Solution
Step 1: Understand the purpose of MIN
The MIN function is designed to find the smallest value in a column of data.Step 2: Compare with other functions
Unlike MAX which finds the largest, MIN specifically returns the smallest value.Final Answer:
It returns the smallest value in a column. -> Option AQuick Check:
MIN = smallest value [OK]
- Confusing MIN with MAX
- Thinking MIN counts rows
- Assuming MIN sums values
Which of the following is the correct syntax to find the maximum value in a column named Sales[Amount] using DAX?
Solution
Step 1: Recall correct DAX function name
The correct function to find the largest value is MAX, not MAXIMUM or MAX_VALUE.Step 2: Check column reference syntax
In DAX, columns are referenced as TableName[ColumnName], so Sales[Amount] is correct.Final Answer:
MAX(Sales[Amount]) -> Option AQuick Check:
MAX + [Column] syntax [OK]
- Using wrong function names like MAXIMUM
- Using dot notation instead of brackets
- Adding extra words in function name
Given the table Sales with Amount values: 100, 250, 75, 300, what is the result of MIN(Sales[Amount]) and MAX(Sales[Amount])?
Solution
Step 1: Identify smallest value in Amount column
The values are 100, 250, 75, 300. The smallest is 75.Step 2: Identify largest value in Amount column
The largest value among these is 300.Final Answer:
MIN = 75, MAX = 300 -> Option DQuick Check:
MIN = 75, MAX = 300 [OK]
- Mixing up smallest and largest values
- Assuming zero is minimum without data
- Ignoring actual data values
What is wrong with this DAX expression to find the minimum sales amount?MIN(Sales.Amount)
Solution
Step 1: Check column reference syntax
DAX requires columns to be referenced as TableName[ColumnName], not TableName.ColumnName.Step 2: Validate function usage
MIN is valid for numeric columns, so the function is correct but the syntax is wrong.Final Answer:
The table and column should be referenced with brackets, not dot notation. -> Option BQuick Check:
Use brackets for columns in DAX [OK]
- Using dot notation instead of brackets
- Confusing MIN with MAX
- Thinking MIN can't be used on numbers
You have a sales table with columns Region and SalesAmount. You want to create a measure that shows the maximum sales amount only for the East region. Which DAX expression is correct?
A) MAX(Sales[SalesAmount])
B) CALCULATE(MAX(Sales[SalesAmount]), FILTER(Sales[Region] = "East"))
C) MAXX(FILTER(Sales, Sales[Region] = "East"), Sales[SalesAmount])
D) MIN(Sales[SalesAmount])
Solution
Step 1: Understand filtering by region
We want the max sales amount only for the East region, so we must filter the table to East.Step 2: Evaluate options
MAX(Sales[SalesAmount]) returns max for all regions.
CALCULATE(MAX(Sales[SalesAmount]), FILTER(Sales[Region] = "East")) uses FILTER incorrectly; FILTER requires a table as the first argument followed by a condition.
MAXX(FILTER(Sales, Sales[Region] = "East"), Sales[SalesAmount]) correctly filters Sales to East and then finds max SalesAmount.
MIN returns minimum, not maximum.Final Answer:
MAXX(FILTER(Sales, Sales[Region] = "East"), Sales[SalesAmount]) -> Option CQuick Check:
Use MAXX + FILTER for conditional max [OK]
- Using MAX without filtering
- Incorrect CALCULATE filter syntax
- Using MIN instead of MAX
Ready to prove it?
Pass the test and this pattern moves unknown
