ChatGPT Versus 2 Humans Writing Power Query – 2355

Laura B has a tricky Power Query question today. She needs to delete all rows where B=C and D=E. Bill solves this in the Power Query Editor but knows it is not efficient.

He turns to ChatGPT – an Artificial Intelligence tool that is in a free research preview. Bill is amazed at how quickly ChatGPT writes M code for Power Query. But then he bangs his head against the wall trying to get it to work.

See why Stack Overflow has banned ChatGPT because it generates code that is usually wrong but looks like it could work.

Finally, we turn to Smozgur, author of the upcoming “You wouldn’t write professional VBA code using the macro recorder would you? A Programmer’s Guide to M” book for his efficient solution.

As a bonus, Bill shows ChatGPT’s attempts to write Excel formulas. Bill is convinced that his late Uncle B’s is secretly running ChatGPT from the great beyond.

Table of Contents
(0:00) 3 Ways to Solve Power Query Problem
(0:29) Human versus ChatGPT
(0:55) What is ChatGPT
(2:44) StackOverflow bans ChatGPT
(3:49) Tricky Power Query problem from Laura
(4:32) Power Query to delete based on 2 conditions
(5:00) Power Query Add Conditional Column
(7:34) Asking ChatGPT for Power Query code
(8:12) ChatGPT is AMAZING!
(8:28) Adjusting ChatGPT Code
(8:51) Why ChatGPT code sucked
(9:45) Efficient M code for 2 conditions
(10:44) ChatGPT success with IF AND formula
(11:03) ChatGPT fails for Prime number formula
(11:21) ChatGPT fails again.
(11:44) Uncle B’s ability to talk about anything
(12:19) ChatGPT suggests the fictional ISPRIME function
(12:45) 25% success rate. Not impressed.
(13:15) Nancy plays us out