0
0
Power BIbi_tool~10 mins

Parameters in Power BI - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a parameter that allows users to select a year.

Power BI
YearParameter = SELECTEDVALUE([1])
Drag options to blanks, or click blank then click option'
ACustomer[Name]
BSales[Amount]
CDate[Month]
DYear[Year]
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting a column that does not contain year values.
Using a measure instead of a column.
2fill in blank
medium

Complete the DAX expression to filter sales data based on the selected parameter.

Power BI
FilteredSales = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [1])
Drag options to blanks, or click blank then click option'
AYearParameter
BCustomerParameter
CMonthParameter
DRegionParameter
Attempts:
3 left
💡 Hint
Common Mistakes
Using a parameter unrelated to year.
Using a column name instead of the parameter.
3fill in blank
hard

Fix the error in the parameter usage to correctly filter the data.

Power BI
FilteredData = FILTER(Sales, Sales[Year] = [1])
Drag options to blanks, or click blank then click option'
ASales[Year]
BYearParameter
CSelectedYear
DYear
Attempts:
3 left
💡 Hint
Common Mistakes
Comparing two columns instead of column to parameter.
Using an undefined variable.
4fill in blank
hard

Fill both blanks to create a parameter and use it in a measure to calculate total sales.

Power BI
SelectedYear = [1]
TotalSales = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [2])
Drag options to blanks, or click blank then click option'
ASELECTEDVALUE(Year[Year])
BYearParameter
CSelectedYear
DSUM(Sales[Amount])
Attempts:
3 left
💡 Hint
Common Mistakes
Using the measure SUM(Sales[Amount]) as a parameter.
Mixing parameter names.
5fill in blank
hard

Fill all three blanks to define a parameter, create a measure using it, and filter a table visual.

Power BI
YearParam = [1]
SalesByYear = CALCULATE(SUM(Sales[Amount]), Sales[Year] = [2])
FilteredTable = FILTER(Sales, Sales[Year] = [3])
Drag options to blanks, or click blank then click option'
ASELECTEDVALUE(Year[Year])
BYearParam
DSUM(Sales[Amount])
Attempts:
3 left
💡 Hint
Common Mistakes
Using the sum measure as a parameter.
Inconsistent parameter variable names.