0
0
Power BIbi_tool~20 mins

MIN and MAX in Power BI - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
MIN and MAX Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
dax_lod_result
intermediate
2:00remaining
Calculate the minimum sales amount per product category

You have a sales table with columns ProductCategory and SalesAmount. You want to create a measure that returns the minimum sales amount for each product category.

Which DAX expression will correctly calculate this?

AMinSalesPerCategory = MAX(Sales[SalesAmount])
BMinSalesPerCategory = MIN(Sales[SalesAmount])
CMinSalesPerCategory = CALCULATE(MAX(Sales[SalesAmount]), ALL(Sales))
DMinSalesPerCategory = CALCULATE(MIN(Sales[SalesAmount]), ALLEXCEPT(Sales, Sales[ProductCategory]))
Attempts:
2 left
💡 Hint

Think about how to keep the filter on ProductCategory while calculating the minimum.

visualization
intermediate
1:30remaining
Choose the best visualization for showing max and min sales per region

You want to show the maximum and minimum sales amounts for each region in a report. Which visualization type is best to clearly show both values side by side for easy comparison?

ALine chart showing max and min sales over time
BClustered column chart with separate columns for max and min sales per region
CPie chart showing max and min sales proportions per region
DStacked column chart with max and min sales as stacked values
Attempts:
2 left
💡 Hint

Think about how to compare two values side by side for each category.

data_modeling
advanced
2:30remaining
Create a calculated column to flag max sales per product

You have a sales table with multiple sales records per product. You want to add a calculated column that flags 1 if the sale amount is the maximum for that product, and 0 otherwise.

Which DAX expression correctly creates this calculated column?

AIsMaxSale = IF(Sales[SalesAmount] = CALCULATE(MAX(Sales[SalesAmount]), ALLEXCEPT(Sales, Sales[ProductID])), 1, 0)
BIsMaxSale = IF(Sales[SalesAmount] = MAX(Sales[SalesAmount]), 1, 0)
CIsMaxSale = IF(Sales[SalesAmount] = CALCULATE(MIN(Sales[SalesAmount]), ALLEXCEPT(Sales, Sales[ProductID])), 1, 0)
DIsMaxSale = IF(Sales[SalesAmount] > CALCULATE(MAX(Sales[SalesAmount]), ALL(Sales)), 1, 0)
Attempts:
2 left
💡 Hint

Remember to keep the filter on the current product when calculating the max.

🔧 Formula Fix
advanced
2:00remaining
Identify the error in this DAX measure for max sales per year

Given this DAX measure:

MaxSalesYear = MAXX(FILTER(Sales, Sales[Year] = MAX(Sales[Year])), Sales[SalesAmount])

What error or issue will this measure cause when used in a report?

Power BI
MaxSalesYear = MAXX(FILTER(Sales, Sales[Year] = MAX(Sales[Year])), Sales[SalesAmount])
AIt causes a circular dependency error because MAX is used inside FILTER on the same column
BIt returns the maximum sales amount for the current year context correctly
CIt returns the maximum sales amount for all years ignoring filters
DIt causes a syntax error due to incorrect use of MAXX
Attempts:
2 left
💡 Hint

Think about how MAX inside FILTER behaves when filtering the same column.

🧠 Conceptual
expert
1:30remaining
Understanding MIN and MAX behavior with BLANK values

In Power BI, when calculating MIN or MAX over a column that contains BLANK() values, what is the behavior?

Choose the correct statement.

AMIN returns BLANK if any BLANK exists, MAX returns the maximum ignoring BLANK
BMIN and MAX treat BLANK as zero and include it in calculations
CMIN and MAX ignore BLANK values and return the minimum or maximum of non-blank values
DMIN and MAX return BLANK if any BLANK exists in the column
Attempts:
2 left
💡 Hint

Think about how aggregation functions treat missing or empty values.