Power QueryExercises

Errors and validation quiz

Where cell errors come from and how to remove, replace or catch them.

Revise first: Find, remove and replace errors, try … otherwise, Profile columns before you trust them, Validate data and fail loudly

Question 1

1.What does this return?

try Number.FromText("TBC") otherwise -1
Question 2

2.What does this return?

Table.RowCount(Table.RemoveRowsWithErrors(Table.TransformColumnTypes(#table({"Q"}, {{"1"}, {"x"}, {"3"}}), {{"Q", Int64.Type}})))
Question 3

3.What does this return?

(try 1 / 0)[HasError]
Question 4

4.You remove errors before the Change Type step. What happens?

Question 5

5.Why might replacing errors with 0 be a bad idea?

Question 6

6.Which step shows only the rows that have errors?

Question 7

7.What's the advantage of try … otherwise over listing known fault codes in an if?

Question 8

8.What does this return?

(try error "boom")[Error][Message]
0 of 8 answered. Unanswered questions count as wrong.