0
0
Power BIbi_tool~10 mins

Data type changes 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 convert the 'Sales' column to a whole number in Power Query.

Power BI
Table.TransformColumnTypes(Source, {{"Sales", [1])
Drag options to blanks, or click blank then click option'
ADate.Type
BText.Type
CInt64.Type
DLogical.Type
Attempts:
3 left
💡 Hint
Common Mistakes
Using Text.Type instead of Int64.Type causes the column to become text.
Using Date.Type or Logical.Type will cause errors if the data is numeric.
2fill in blank
medium

Complete the DAX formula to convert the 'Amount' column to a decimal number.

Power BI
ConvertedAmount = CONVERT(Table[Amount], [1])
Drag options to blanks, or click blank then click option'
AINTEGER
BDOUBLE
CSTRING
DBOOLEAN
Attempts:
3 left
💡 Hint
Common Mistakes
Using INTEGER converts to whole numbers, not decimals.
STRING or BOOLEAN are not numeric types.
3fill in blank
hard

Fix the error in this Power Query step to convert 'DateText' to date type.

Power BI
Table.TransformColumnTypes(Source, {{"DateText", [1])
Drag options to blanks, or click blank then click option'
ADate.Type
BDateTime.Type
CText.Type
DNumber.Type
Attempts:
3 left
💡 Hint
Common Mistakes
Using Text.Type does not convert the data, it keeps it as text.
Number.Type is invalid for date data.
4fill in blank
hard

Fill both blanks to convert 'Price' to decimal and 'IsAvailable' to logical in Power Query.

Power BI
Table.TransformColumnTypes(Source, {{"Price", [1], {"IsAvailable", [2])
Drag options to blanks, or click blank then click option'
ACurrency.Type
BLogical.Type
CDecimal.Type
DText.Type
Attempts:
3 left
💡 Hint
Common Mistakes
Using Currency.Type instead of Decimal.Type changes formatting but not data type.
Using Text.Type for IsAvailable keeps it as text, not logical.
5fill in blank
hard

Fill all three blanks to create a DAX measure that converts 'SalesAmount' to integer, filters for values greater than 1000, and sums them.

Power BI
TotalSales = SUMX(FILTER(Table, CONVERT(Table[SalesAmount], [1]) [2] 1000), Table[SalesAmount])
Drag options to blanks, or click blank then click option'
ADOUBLE
B>
CINTEGER
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using DOUBLE converts to decimal, not integer.
Using < instead of > filters the wrong values.