exam questions

Exam DP-500 All Questions

View all questions & answers for the DP-500 exam

Exam DP-500 topic 1 question 178 discussion

Actual exam question from Microsoft's DP-500
Question #: 178
Topic #: 1
[All DP-500 Questions]

HOTSPOT
-

You use Power Query Editor to transform data.

You need to create a function named ConvertF2C that accepts a temperature value in Fahrenheit and returns a temperature value in Celsius.

How should you complete the code? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Momoanwar
1 year, 5 months ago
Tempc + convertf2c, chatgpt : For the Power Query Editor function that converts Fahrenheit to Celsius, you should define the function parameter as the temperature in Fahrenheit. The function itself should then perform the conversion. Here's how you should complete the code: - For the parameter: `(TempF as number) =>` - For the function name in the `in` clause: `ConvertF2C` The complete function in Power Query M language should look like this: ``` (TempF as number) => let TempC = (TempF - 32) * 5/9 in ConvertF2C ```
upvoted 1 times
Momoanwar
1 year, 5 months ago
I mean tempf + convertf2c sorry
upvoted 1 times
Legen___dary
1 year, 5 months ago
ChatGPT has lead you a little astray :). The Let statement is defining a list of variables, in this case only TempC. The In statement can then reference these variables. ConvertF2C isn't defined in the Let so wouldn't be recognised by the In. The correct answer should be TempF + TempC.
upvoted 2 times
...
...
...
MaryemSB
1 year, 6 months ago
Source TempC https://datamadness.medium.com/how-to-write-functions-in-power-query-4a29302760ce
upvoted 1 times
MaryemSB
1 year, 6 months ago
I correct myself: First is (TempF as number) since TempF should be passed as a parameter Second, not sure but it should be TempC to retrieve the result of expression from the "let" statement to the "in" statement
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...